GF shell’s “generate_random” has an undocumented depth default

9 views
Skip to first unread message

Michal Měchura

unread,
May 16, 2025, 11:58:58 AMMay 16
to gf-...@googlegroups.com

Hi all,

It seems that, in the GF shell, the gr (generate_random) command has an undocumented default value for the -depth flag.

I have a grammar where gr returns no trees found, but gr -depth=5 does return something.

So it would appear that the default is 4 (or less) but this is not documented anywhere, neither in the shell reference nor in the output of help gr.

Not a big deal, of course, except I just lost like half an hour trying to fix a grammar that wasn’t broken. So maybe this default should be documented? And perhaps the default depth should be more generous than just a measly 4?

I submit this for your kind consideration, oh mighty GF developers.
Michal

Gustavo Carvalho

unread,
May 17, 2025, 9:37:42 AMMay 17
to gf-...@googlegroups.com
Hi Michal,

I have the impression that the default value for depth is mentioned in the tutorial (https://www.grammaticalframework.org/doc/tutorial/gf-tutorial.html): "The default depth is 3; the depth can be set by using the depth flag". I agree that it would be a nice addition to have this information added to the shell reference.

Regards,
Gustavo

--

---
You received this message because you are subscribed to the Google Groups "Grammatical Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gf-dev+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gf-dev/CACWB%2Brk8VwUVHYGMfpyLjAy_Jb-m_sJtuLLxkhyaZJ2DwmRWtw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages