Skip to content

Commit 183e421

Browse files
committed
update default depth in tutorial and help text
1 parent 3e0c0fa commit 183e421

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

doc/gf-help-full.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#TINY
4747

4848
The command has one argument which is either function, expression or
49-
a category defined in the abstract syntax of the current grammar.
49+
a category defined in the abstract syntax of the current grammar.
5050
If the argument is a function then ?its type is printed out.
5151
If it is a category then the category definition is printed.
5252
If a whole expression is given it prints the expression with refined
@@ -303,7 +303,7 @@ but the resulting .gf file must be imported separately.
303303

304304
#TINY
305305

306-
Generates a list of random trees, by default one tree.
306+
Generates a list of random trees, by default one tree up to depth 5.
307307
If a tree argument is given, the command completes the Tree with values to
308308
all metavariables in the tree. The generation can be biased by probabilities,
309309
given in a file in the -probs flag.
@@ -315,13 +315,14 @@ given in a file in the -probs flag.
315315
| ``-cat`` | generation category
316316
| ``-lang`` | uses only functions that have linearizations in all these languages
317317
| ``-number`` | number of trees generated
318-
| ``-depth`` | the maximum generation depth
318+
| ``-depth`` | the maximum generation depth (default: 5)
319319
| ``-probs`` | file with biased probabilities (format 'f 0.4' one by line)
320320

321321
- Examples:
322322

323323
| ``gr`` | one tree in the startcat of the current grammar
324324
| ``gr -cat=NP -number=16`` | 16 trees in the category NP
325+
| ``gr -cat=NP -depth=2`` | one tree in the category NP, up to depth 2
325326
| ``gr -lang=LangHin,LangTha -cat=Cl`` | Cl, both in LangHin and LangTha
326327
| ``gr -probs=FILE`` | generate with bias
327328
| ``gr (AdjCN ? (UseN ?))`` | generate trees of form (AdjCN ? (UseN ?))
@@ -338,8 +339,8 @@ given in a file in the -probs flag.
338339

339340
#TINY
340341

341-
Generates all trees of a given category. By default,
342-
the depth is limited to 4, but this can be changed by a flag.
342+
Generates all trees of a given category. By default,
343+
the depth is limited to 5, but this can be changed by a flag.
343344
If a Tree argument is given, the command completes the Tree with values
344345
to all metavariables in the tree.
345346

@@ -353,7 +354,7 @@ to all metavariables in the tree.
353354

354355
- Examples:
355356

356-
| ``gt`` | all trees in the startcat, to depth 4
357+
| ``gt`` | all trees in the startcat, to depth 5
357358
| ``gt -cat=NP -number=16`` | 16 trees in the category NP
358359
| ``gt -cat=NP -depth=2`` | trees in the category NP to depth 2
359360
| ``gt (AdjCN ? (UseN ?))`` | trees of form (AdjCN ? (UseN ?))
@@ -582,7 +583,7 @@ trees where a function node is a metavariable.
582583

583584
- Examples:
584585

585-
| ``l -lang=LangSwe,LangNor -chunks ? a b (? c d)`` |
586+
| ``l -lang=LangSwe,LangNor -chunks ? a b (? c d)`` |
586587

587588

588589
#NORMAL
@@ -647,7 +648,7 @@ The -lang flag can be used to restrict this to fewer languages.
647648
The default start category can be overridden by the -cat flag.
648649
See also the ps command for lexing and character encoding.
649650

650-
The -openclass flag is experimental and allows some robustness in
651+
The -openclass flag is experimental and allows some robustness in
651652
the parser. For example if -openclass="A,N,V" is given, the parser
652653
will accept unknown adjectives, nouns and verbs with the resource grammar.
653654

doc/tutorial/gf-tutorial.t2t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ use ``generate_trees = gt``.
11881188
this wine is fresh
11891189
this wine is warm
11901190
```
1191-
The default **depth** is 3; the depth can be
1191+
The default **depth** is 5; the depth can be
11921192
set by using the ``depth`` flag:
11931193
```
11941194
> generate_trees -depth=2 | l
@@ -1739,9 +1739,9 @@ A new module can **extend** an old one:
17391739
Pizza : Kind ;
17401740
}
17411741
```
1742-
Note that the extended grammar doesn't inherit the start
1743-
category from the grammar it extends, so if you want to
1744-
generate sentences with this grammar, you'll have to either
1742+
Note that the extended grammar doesn't inherit the start
1743+
category from the grammar it extends, so if you want to
1744+
generate sentences with this grammar, you'll have to either
17451745
add a startcat (e.g. ``flags startcat = Question ;``),
17461746
or in the GF shell, specify the category to ``generate_random`` or ``geneate_trees``
17471747
(e.g. ``gr -cat=Comment`` or ``gt -cat=Question``).
@@ -3746,7 +3746,7 @@ However, type-incorrect commands are rejected by the typecheck:
37463746
The parsing is successful but the type checking failed with error(s):
37473747
Couldn't match expected type Device light
37483748
against the interred type Device fan
3749-
In the expression: DKindOne fan
3749+
In the expression: DKindOne fan
37503750
```
37513751

37523752
#NEW
@@ -4184,7 +4184,7 @@ division of integers.
41844184
```
41854185
abstract Calculator = {
41864186
flags startcat = Exp ;
4187-
4187+
41884188
cat Exp ;
41894189

41904190
fun

0 commit comments

Comments
 (0)