doc update, preparing 2.6

This commit is contained in:
aarne
2006-06-17 09:53:42 +00:00
parent df3b453f3b
commit 4204b3e4eb
5 changed files with 133 additions and 46 deletions

View File

@@ -12,6 +12,10 @@ Changes in functionality since May 17, 2005, release of GF Version 2.2
</center> </center>
17/6 (AR) The FCFG parser is now the recommended method for parsing
heavy grammars such as the resource grammars. It does not yet support
literals and variable bindings.
<p> <p>
1/6 (AR) Added the FCFG parser written by Krasimir Angelov. Invoked by 1/6 (AR) Added the FCFG parser written by Krasimir Angelov. Invoked by

View File

@@ -10,11 +10,12 @@
<a href="http://www.cs.chalmers.se/~aarne"> <a href="http://www.cs.chalmers.se/~aarne">
Aarne Ranta</a>, Aarne Ranta</a>,
December 1, 2005, for (forthcoming) GF Version 2.4 June 17, 2006, for (forthcoming) GF Version 2.6
<p> <p>
Forth version: May 17, 2005, for GF Version 2.2.<br> Fifth version: December 1, 2005, for GF Version 2.4
Fourth version: May 17, 2005, for GF Version 2.2.<br>
Third version: June 25, 2003, for GF Version 1.2.<br> Third version: June 25, 2003, for GF Version 1.2.<br>
Second version: June 17, 2002, for GF Version 1.0.<br> Second version: June 17, 2002, for GF Version 1.0.<br>
First version: April 19, 2002. First version: April 19, 2002.
@@ -28,7 +29,7 @@ The GF grammar language is described in other documents.
<p> <p>
There is a separate There is a separate
<a href="javaGUImanual/javaGUImanual.htm">GF Java GUI Manual</a>. <a href="http://www.cs.chalmers.se/~aarne/GF2.0/doc/javaGUImanual/javaGUImanual.htm">Editor User Manual</a>.
@@ -329,8 +330,8 @@ input for a command, so the pipe breaks there.
The following is a copy of the current <tt>HelpFile</tt>. The following is a copy of the current <tt>HelpFile</tt>.
<pre> <pre>
-- GF help file updated for GF 2.4, 1/12/2005. -- GF help file updated for GF 2.6, 17/6/2006.
-- *: Commands and options marked with * are not yet implemented. -- *: Commands and options marked with * are currently not implemented.
-- --
-- Each command has a long and a short name, options, and zero or more -- Each command has a long and a short name, options, and zero or more
-- arguments. Commands are sorted by functionality. The short name is -- arguments. Commands are sorted by functionality. The short name is
@@ -351,6 +352,7 @@ i, import: i File
.gfr precompiled GF resource .gfr precompiled GF resource
.gfcm multilingual canonical GF .gfcm multilingual canonical GF
.gfe example-based grammar files (only with the -ex option) .gfe example-based grammar files (only with the -ex option)
.gfwl multilingual word list (preprocessed to abs + cncs)
.ebnf Extended BNF format .ebnf Extended BNF format
.cf Context-free (BNF) format .cf Context-free (BNF) format
.trc TransferCore format .trc TransferCore format
@@ -358,7 +360,8 @@ i, import: i File
-old old: parse in GF<2.0 format (not necessary) -old old: parse in GF<2.0 format (not necessary)
-v verbose: give lots of messages -v verbose: give lots of messages
-s silent: don't give error messages -s silent: don't give error messages
-src source: ignore precompiled gfc and gfr files -src from source: ignore precompiled gfc and gfr files
-gfc from gfc: use compiled modules whenever they exist
-retain retain operations: read resource modules (needed in comm cc) -retain retain operations: read resource modules (needed in comm cc)
-nocf don't build context-free grammar (thus no parser) -nocf don't build context-free grammar (thus no parser)
-nocheckcirc don't eliminate circular rules from CF -nocheckcirc don't eliminate circular rules from CF
@@ -367,6 +370,7 @@ i, import: i File
-o do emit code (default with new grammar format) -o do emit code (default with new grammar format)
-ex preprocess .gfe files if needed -ex preprocess .gfe files if needed
-prob read probabilities from top grammar file (format --# prob Fun Double) -prob read probabilities from top grammar file (format --# prob Fun Double)
-treebank read a treebank file to memory (xml format)
flags: flags:
-abs set the name used for abstract syntax (with -old option) -abs set the name used for abstract syntax (with -old option)
-cnc set the name used for concrete syntax (with -old option) -cnc set the name used for concrete syntax (with -old option)
@@ -375,12 +379,16 @@ i, import: i File
-optimize select an optimization to override file-defined flags -optimize select an optimization to override file-defined flags
-conversion select parsing method (values strict|nondet) -conversion select parsing method (values strict|nondet)
-probs read probabilities from file (format (--# prob) Fun Double) -probs read probabilities from file (format (--# prob) Fun Double)
-preproc use a preprocessor on each source file
-noparse read nonparsable functions from file (format --# noparse Funs) -noparse read nonparsable functions from file (format --# noparse Funs)
examples: examples:
i English.gf -- ordinary import of Concrete i English.gf -- ordinary import of Concrete
i -retain german/ParadigmsGer.gf -- import of Resource to test i -retain german/ParadigmsGer.gf -- import of Resource to test
* rl, remove_language: rl Language r, reload: r
Executes the previous import (i) command.
rl, remove_language: rl Language
Takes away the language from the state. Takes away the language from the state.
e, empty: e e, empty: e
@@ -432,6 +440,8 @@ pg, print_grammar: pg
flags: flags:
-printer -printer
-lang -lang
-startcat -- The start category of the generated grammar.
Only supported by some grammar printers.
examples: examples:
pg -printer=cf -- show the context-free skeleton pg -printer=cf -- show the context-free skeleton
@@ -481,11 +491,11 @@ l, linearize: l PattList? Tree
HINT: see GF language specification for the syntax of Pattern and Term. HINT: see GF language specification for the syntax of Pattern and Term.
You can also copy and past parsing results. You can also copy and past parsing results.
options: options:
-table show parameters
-struct bracketed form -struct bracketed form
-record record, i.e. explicit GF concrete syntax term -table show parameters (not compatible with -record, -all)
-all show all forms and variants -record record, i.e. explicit GF concrete syntax term (not compatible with -table, -all)
-multi linearize to all languages (the other options don't work) -all show all forms and variants (not compatible with -record, -table)
-multi linearize to all languages (can be combined with the other options)
flags: flags:
-lang linearize in this grammar -lang linearize in this grammar
-number give this number of forms at most -number give this number of forms at most
@@ -502,11 +512,14 @@ p, parse: p String
-all as -lines, but also parse empty lines -all as -lines, but also parse empty lines
-prob rank results by probability -prob rank results by probability
-cut stop after first lexing result leading to parser success -cut stop after first lexing result leading to parser success
-fail show strings whose parse fails prefixed by #FAIL
-ambiguous show strings that have more than one parse prefixed by #AMBIGUOUS
options for selecting parsing method: options for selecting parsing method:
(default)parse using an overgenerating CFG (default)parse using an overgenerating CFG
-cfg parse using a much less overgenerating CFG -cfg parse using a much less overgenerating CFG
-mcfg parse using an even less overgenerating MCFG -mcfg parse using an even less overgenerating MCFG
Note: the first time parsing with -cfg or -mcfg might take a long time -fcfg parse using a faster variant of MCFG
Note: the first time parsing with -cfg, -mcfg, and -fcfg might take a long time
options that only work for the default parsing method: options that only work for the default parsing method:
-n non-strict: tolerates morphological errors -n non-strict: tolerates morphological errors
-ign ignore unknown words when parsing -ign ignore unknown words when parsing
@@ -531,6 +544,37 @@ at, apply_transfer: at (Module.Fun | Fun)
examples: examples:
p -lang=Cncdecimal "123" | at num2bin | l -- convert dec to bin p -lang=Cncdecimal "123" | at num2bin | l -- convert dec to bin
tb, tree_bank: tb
Generate a multilingual treebank from a list of trees (default) or compare
to an existing treebank.
options:
-c compare to existing xml-formatted treebank
-trees return the trees of the treebank
-all show all linearization alternatives (branches and variants)
-table show tables of linearizations with parameters
-record show linearization records
-xml wrap the treebank (or comparison results) with XML tags
-mem write the treebank in memory instead of a file TODO
examples:
gr -cat=S -number=100 | tb -xml | wf tb.xml -- random treebank into file
rf tb.xml | tb -c -- compare-test treebank from file
rf old.xml | tb -trees | tb -xml -- create new treebank from old
ut, use_treebank: ut String
Lookup a string in a treebank and return the resulting trees.
Use 'tb' to create a treebank and 'i -treebank' to read one from
a file.
options:
-assocs show all string-trees associations in the treebank
-strings show all strings in the treebank
-trees show all trees in the treebank
-raw return the lookup result as string, without typechecking it
flags:
-treebank use this treebank (instead of the latest introduced one)
examples:
ut "He adds this to that" | l -multi -- use treebank lookup as parser in translation
ut -assocs | grep "ComplV2" -- show all associations with ComplV2
tt, test_tokenizer: tt String tt, test_tokenizer: tt String
Show the token list sent to the parser when String is parsed. Show the token list sent to the parser when String is parsed.
HINT: can be useful when debugging the parser. HINT: can be useful when debugging the parser.
@@ -614,10 +658,14 @@ gt, generate_trees: gt Tree?
-cat generate in this category -cat generate in this category
-lang use the abstract syntax of this grammar -lang use the abstract syntax of this grammar
-number generate (at most) this number of trees -number generate (at most) this number of trees
-noexpand don't expand these categories (comma-separated, e.g. -noexpand=V,CN)
-doexpand only expand these categories (comma-separated, e.g. -doexpand=V,CN)
examples: examples:
gt -depth=10 -cat=NP -- generate all NP's to depth 10 gt -depth=10 -cat=NP -- generate all NP's to depth 10
gt (PredVP ? (NegVG ?)) -- generate all trees of this form gt (PredVP ? (NegVG ?)) -- generate all trees of this form
gt -cat=S -tr | l -- gererate and linearize gt -cat=S -tr | l -- generate and linearize
gt -noexpand=NP | l -mark=metacat -- the only NP is meta, linearized "?0 +NP"
gt | l | p -lines -ambiguous | grep "#AMBIGUOUS" -- show ambiguous strings
ma, morphologically_analyse: ma String ma, morphologically_analyse: ma String
Runs morphological analysis on each word in String and displays Runs morphological analysis on each word in String and displays
@@ -782,12 +830,21 @@ sa, speak_aloud: sa String
h | sa -- listen to the list of commands h | sa -- listen to the list of commands
gr -cat=S | l | sa -- generate a random sentence and speak it aloud gr -cat=S | l | sa -- generate a random sentence and speak it aloud
si, speech_input: si
Uses an ATK speech recognizer to get speech input.
flags:
-lang: The grammar to use with the speech recognizer.
-cat: The grammar category to get input in.
-language: Use acoustic model and dictionary for this language.
-number: The number of utterances to recognize.
h, help: h Command? h, help: h Command?
Displays the paragraph concerning the command from this help file. Displays the paragraph concerning the command from this help file.
Without the argument, shows the first lines of all paragraphs. Without the argument, shows the first lines of all paragraphs.
options options
-all show the whole help file -all show the whole help file
-defs show user-defined commands and terms -defs show user-defined commands and terms
-FLAG show the values of FLAG (works for grammar-independent flags)
examples: examples:
h print_grammar -- show all information on the pg command h print_grammar -- show all information on the pg command
@@ -855,7 +912,6 @@ q, quit: q
Each of the flags can have the suffix _subs, which performs Each of the flags can have the suffix _subs, which performs
common subexpression elimination after the main optimization. common subexpression elimination after the main optimization.
Thus, -optimize=all_subs is the most aggressive one. Thus, -optimize=all_subs is the most aggressive one.
-optimize=share share common branches in tables -optimize=share share common branches in tables
-optimize=parametrize first try parametrize then do share with the rest -optimize=parametrize first try parametrize then do share with the rest
-optimize=values represent tables as courses-of-values -optimize=values represent tables as courses-of-values
@@ -893,8 +949,15 @@ q, quit: q
-printer=jsgf Java Speech Grammar Format -printer=jsgf Java Speech Grammar Format
-printer=srgs_xml SRGS XML format -printer=srgs_xml SRGS XML format
-printer=srgs_xml_prob SRGS XML format, with weights -printer=srgs_xml_prob SRGS XML format, with weights
-printer=srgs_xml_ms_sem SRGS XML format, with semantic tags for the
Microsoft Speech API.
-printer=vxml Generate a dialogue system in VoiceXML.
-printer=slf a finite automaton in the HTK SLF format -printer=slf a finite automaton in the HTK SLF format
-printer=slf_graphviz the same automaton as in SLF, but in Graphviz format -printer=slf_graphviz the same automaton as slf, but in Graphviz format
-printer=slf_sub a finite automaton with sub-automata in the
HTK SLF format
-printer=slf_sub_graphviz the same automaton as slf_sub, but in
Graphviz format
-printer=fa_graphviz a finite automaton with labelled edges -printer=fa_graphviz a finite automaton with labelled edges
-printer=regular a regular grammar in a simple BNF -printer=regular a regular grammar in a simple BNF
-printer=unpar a gfc grammar with parameters eliminated -printer=unpar a gfc grammar with parameters eliminated
@@ -914,6 +977,8 @@ q, quit: q
-transform, transformation performed on a syntax tree. The default is identity. -transform, transformation performed on a syntax tree. The default is identity.
-transform=identity no change -transform=identity no change
-transform=compute compute by using definitions in the grammar -transform=compute compute by using definitions in the grammar
-transform=nodup return the term only if it has no constants duplicated
-transform=nodupatom return the term only if it has no atomic constants duplicated
-transform=typecheck return the term only if it is type-correct -transform=typecheck return the term only if it is type-correct
-transform=solve solve metavariables as derived refinements -transform=solve solve metavariables as derived refinements
-transform=context solve metavariables by unique refinements as variables -transform=context solve metavariables by unique refinements as variables
@@ -929,7 +994,17 @@ q, quit: q
-unlexer=concat remove all spaces -unlexer=concat remove all spaces
-unlexer=bind like identity, but bind at "&+" -unlexer=bind like identity, but bind at "&+"
-- *: Commands and options marked with * are currently not implemented. -mark, marking of parts of tree in linearization. The default is none.
-mark=metacat append "+CAT" to every metavariable, showing its category
-mark=struct show tree structure with brackets
-mark=java show tree structure with XML tags (used in gfeditor)
-coding, Some grammars are in UTF-8, some in isolatin-1.
If the letters ä (a-umlaut) and ö (o-umlaut) look strange, either
change your terminal to isolatin-1, or rewrite the grammar with
'pg -utf8'.
-- *: Commands and options marked with * are not currently implemented.
</pre> </pre>
@@ -952,7 +1027,7 @@ a Fudget GUI, and a Java GUI. They all use the same abstract command language,
the difference being that the subshell has a string syntax for each command, the difference being that the subshell has a string syntax for each command,
whereas the GUIs mostly use menus and buttons to issue commands. whereas the GUIs mostly use menus and buttons to issue commands.
There is a separate There is a separate
<a href="javaGUImanual/javaGUImanual.htm">GF Java GUI Manual</a>. <a href="http://www.cs.chalmers.se/~aarne/GF2.0/doc/javaGUImanual/javaGUImanual.htm">Editor User Manual</a>.
<p> <p>

View File

@@ -28,7 +28,7 @@ sections are still unwritten.
<p> <p>
<a href="../../GF2.0/Tutorial/gf-tutorial.html">Old Grammarian's Tutorial</a> <a href="../../GF2.0/Tutorial/gf-tutorial.html">Old Grammarian's Tutorial</a>
on writing GF grammars, with exercises. on writing GF grammars, with exercises. GF v 1.2, before the module system.
@@ -90,13 +90,14 @@ parser.
<h2>Grammar library documentation</h2> <h2>Grammar library documentation</h2>
<a href="../lib/resource/doc/gf-resource.html">Resource grammar library</a> <a href="resource.pdf">
document (v 0.9). GF Resource Grammar Library</a>
user's manual, for API v 1.0.
<p> <p>
<a href="../lib/resource-1.0/doc/index.html"> <a href="../lib/resource-1.0/doc/index.html">
Resource grammar library documentation</a> On-line resource grammar library documentation</a>
in progress for the forthcoming API v 1.0. in progress for the forthcoming API v 1.0.
<p> <p>
@@ -105,6 +106,11 @@ in progress for the forthcoming API v 1.0.
Resource grammar writing HOWTO</a> Resource grammar writing HOWTO</a>
document in progress (forthcoming API v 1.0). document in progress (forthcoming API v 1.0).
<p>
<a href="../lib/resource/doc/gf-resource.html">Old resource grammar library</a>
document (v 0.9).

View File

@@ -27,8 +27,8 @@ txtHelpCommand c =
_ -> "Command not found." _ -> "Command not found."
txtHelpFile = txtHelpFile =
"\n-- GF help file updated for GF 2.2, 17/5/2005." ++ "\n-- GF help file updated for GF 2.6, 17/6/2006." ++
"\n-- *: Commands and options marked with * are not yet implemented." ++ "\n-- *: Commands and options marked with * are currently not implemented." ++
"\n--" ++ "\n--" ++
"\n-- Each command has a long and a short name, options, and zero or more" ++ "\n-- Each command has a long and a short name, options, and zero or more" ++
"\n-- arguments. Commands are sorted by functionality. The short name is" ++ "\n-- arguments. Commands are sorted by functionality. The short name is" ++
@@ -215,7 +215,8 @@ txtHelpFile =
"\n (default)parse using an overgenerating CFG" ++ "\n (default)parse using an overgenerating CFG" ++
"\n -cfg parse using a much less overgenerating CFG" ++ "\n -cfg parse using a much less overgenerating CFG" ++
"\n -mcfg parse using an even less overgenerating MCFG" ++ "\n -mcfg parse using an even less overgenerating MCFG" ++
"\n Note: the first time parsing with -cfg or -mcfg might take a long time" ++ "\n -fcfg parse using a faster variant of MCFG" ++
"\n Note: the first time parsing with -cfg, -mcfg, and -fcfg might take a long time" ++
"\n options that only work for the default parsing method:" ++ "\n options that only work for the default parsing method:" ++
"\n -n non-strict: tolerates morphological errors" ++ "\n -n non-strict: tolerates morphological errors" ++
"\n -ign ignore unknown words when parsing" ++ "\n -ign ignore unknown words when parsing" ++

View File

@@ -1,5 +1,5 @@
-- GF help file updated for GF 2.2, 17/5/2005. -- GF help file updated for GF 2.6, 17/6/2006.
-- *: Commands and options marked with * are not yet implemented. -- *: Commands and options marked with * are currently not implemented.
-- --
-- Each command has a long and a short name, options, and zero or more -- Each command has a long and a short name, options, and zero or more
-- arguments. Commands are sorted by functionality. The short name is -- arguments. Commands are sorted by functionality. The short name is
@@ -186,7 +186,8 @@ p, parse: p String
(default)parse using an overgenerating CFG (default)parse using an overgenerating CFG
-cfg parse using a much less overgenerating CFG -cfg parse using a much less overgenerating CFG
-mcfg parse using an even less overgenerating MCFG -mcfg parse using an even less overgenerating MCFG
Note: the first time parsing with -cfg or -mcfg might take a long time -fcfg parse using a faster variant of MCFG
Note: the first time parsing with -cfg, -mcfg, and -fcfg might take a long time
options that only work for the default parsing method: options that only work for the default parsing method:
-n non-strict: tolerates morphological errors -n non-strict: tolerates morphological errors
-ign ignore unknown words when parsing -ign ignore unknown words when parsing