Batch Mode
- Keywords:
- batch
You cannot use batch mode after you've started link-grammar.exe by double clicking on it.
You have to start a DOS (Command) prompt and change to the directory where the .exe is located.
The best way to do this is to create a copy of cmd.exe in the 'data' directory.
To do this, click Start, type cmd.exe into the Search box, when the program icon appears right click on it and select 'Copy',
then go to File Explorer and Paste it into the 'data' folder where the .exe is located.
Double click cmd.exe to open it.
Tip: Right click on the cmd.exe top border then select 'Properties',
then in the Layout tab change the two Width settings from the default 80 to something larger like 120.
In the Colors tab you can also change text and background colors.
(Windows will remember the settings.)
RUNNING BATCH MODE (from the DOS prompt)
run the following command:
link-grammar474 -!disjuncts -!senses -!width=120 < input.txt > output.txt
where:
the -!disjuncts and -!senses options generate corpus statistics
input.txt has your sentences (one per line)
output.txt is where you want the parses to go (skip this if you want output to go to the screen as usual)
run this command (with the -!graphics option) if you don't want to see graphs of the linkages:
link-grammar474 -!disjuncts -!senses !graphics < input.txt > output.txt
See this Introduction for more info: http://
NOTE: You can get a list of all variables (options) by using the !variables command when you're running
in the normal command line mode (by double clicking on link-grammar474
Here are the current variables:
linkparser> !variables
Variable Controls Value
-------- -------- -----
bad Display of bad linkages 0 (Off)
batch Batch mode 0 (Off)
cluster Use clusters to loosen parsing 0 (Off)
constituents Generate constituent output 0
cost-model Cost model used for ranking 1
cost-max Largest cost to be considered 2.00
disjuncts Display of disjunct used 0 (Off)
echo Echoing of input sentence 0 (Off)
graphics Graphical display of linkage 1 (On)
islands-ok Use of null-linked islands 0 (Off)
limit The maximum linkages processed 1000
links Display of complete link data 0 (Off)
max-length Maximum sentence length 170
memory Max memory allowed -1
null Allow null links 1 (On)
null-block Size of blocks with null count 1 1
panic Use of "panic mode" 1 (On)
postscript Generate postscript output 0 (Off)
senses Display of word senses 0 (Off)
short Max length of short links 10
timeout Abort parsing after this many seconds 30
union Display of 'union' linkage 0 (Off)
use-fat Use fat links when parsing 0 (Off)
verbosity Level of detail in output 1
walls Display wall words 0 (Off)
width The width of the display 120
Toggle a boolean variable as in "!batch"; set a variable as in "!width=100".
linkparser>