mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
help for gt
This commit is contained in:
@@ -349,13 +349,16 @@ txtHelpFile =
|
|||||||
"\n the tree." ++
|
"\n the tree." ++
|
||||||
"\n options:" ++
|
"\n options:" ++
|
||||||
"\n -metas also return trees that include metavariables" ++
|
"\n -metas also return trees that include metavariables" ++
|
||||||
|
"\n -all generate all (lazily)" ++
|
||||||
|
"\n -lin linearize result of -all (otherwise, use pipe to linearize)" ++
|
||||||
"\n flags:" ++
|
"\n flags:" ++
|
||||||
"\n -depth generate to this depth (default 3)" ++
|
"\n -depth generate to this depth (default 3)" ++
|
||||||
"\n -atoms take this number of atomic rules of each category (default unlimited)" ++
|
"\n -atoms take this number of atomic rules of each category (default unlimited)" ++
|
||||||
"\n -alts take this number of alternatives at each branch (default unlimited)" ++
|
"\n -alts take this number of alternatives at each branch (default unlimited)" ++
|
||||||
"\n -cat generate in this category" ++
|
"\n -cat generate in this category" ++
|
||||||
|
"\n -old use an older algorithm (usually more memory-consuming)" ++
|
||||||
"\n -lang use the abstract syntax of this grammar" ++
|
"\n -lang use the abstract syntax of this grammar" ++
|
||||||
"\n -number generate (at most) this number of trees" ++
|
"\n -number generate (at most) this number of trees (also works with -all)" ++
|
||||||
"\n -noexpand don't expand these categories (comma-separated, e.g. -noexpand=V,CN)" ++
|
"\n -noexpand don't expand these categories (comma-separated, e.g. -noexpand=V,CN)" ++
|
||||||
"\n -doexpand only expand these categories (comma-separated, e.g. -doexpand=V,CN)" ++
|
"\n -doexpand only expand these categories (comma-separated, e.g. -doexpand=V,CN)" ++
|
||||||
"\n examples:" ++
|
"\n examples:" ++
|
||||||
|
|||||||
@@ -50,8 +50,9 @@ generateTrees opts gr cat n mn mt = map str2tr $ generate gr' ifm cat' n mn mt'
|
|||||||
ifm = oElem showOld opts
|
ifm = oElem showOld opts
|
||||||
|
|
||||||
generateAll :: Options -> (Exp -> IO ()) -> GFCGrammar -> Cat -> IO ()
|
generateAll :: Options -> (Exp -> IO ()) -> GFCGrammar -> Cat -> IO ()
|
||||||
generateAll opts io gr cat = mapM_ (io . str2tr) $ gen cat'
|
generateAll opts io gr cat = mapM_ (io . str2tr) $ num $ gen cat'
|
||||||
where
|
where
|
||||||
|
num = optIntOrAll opts flagNumber
|
||||||
gr' = gr2sgr opts emptyProbs gr
|
gr' = gr2sgr opts emptyProbs gr
|
||||||
cat' = prt $ snd cat
|
cat' = prt $ snd cat
|
||||||
gen c = generate gr' False c 10 Nothing Nothing
|
gen c = generate gr' False c 10 Nothing Nothing
|
||||||
|
|||||||
@@ -320,13 +320,16 @@ gt, generate_trees: gt Tree?
|
|||||||
the tree.
|
the tree.
|
||||||
options:
|
options:
|
||||||
-metas also return trees that include metavariables
|
-metas also return trees that include metavariables
|
||||||
|
-all generate all (lazily)
|
||||||
|
-lin linearize result of -all (otherwise, use pipe to linearize)
|
||||||
flags:
|
flags:
|
||||||
-depth generate to this depth (default 3)
|
-depth generate to this depth (default 3)
|
||||||
-atoms take this number of atomic rules of each category (default unlimited)
|
-atoms take this number of atomic rules of each category (default unlimited)
|
||||||
-alts take this number of alternatives at each branch (default unlimited)
|
-alts take this number of alternatives at each branch (default unlimited)
|
||||||
-cat generate in this category
|
-cat generate in this category
|
||||||
|
-old use an older algorithm (usually more memory-consuming)
|
||||||
-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 (also works with -all)
|
||||||
-noexpand don't expand these categories (comma-separated, e.g. -noexpand=V,CN)
|
-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)
|
-doexpand only expand these categories (comma-separated, e.g. -doexpand=V,CN)
|
||||||
examples:
|
examples:
|
||||||
|
|||||||
Reference in New Issue
Block a user