Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I compile the ShortTalk grammar?

grammar
0
Posted

How do I compile the ShortTalk grammar?

0

The ShortTalk grammar is defined in the file grammar.elg. The command M-x listen-load-grammar compiles the grammar into two formats: one is grammar.lcm, a file of lists describing the totality of all commands derived from the grammar, and the other is grammar.txt, which contains a subset of commands, each represented as a pair of the form spoken form/written form. It is assumed that the subset contains enough bigrams to cover all the commands (which are usually bigrams or trigram, although 4-grams also are common) (Currently, even the grammar.txt contains around 20,000 commands. This could probably safely be pruned.) The file grammar.lcm is loaded into a hash table when listen-mode is activated. This is again a solution that is much more space intensive than really needed. However, the resulting parser is fast, since it checks each prefix of possible command words through a single hash table lookup.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123