Grammar

Simon provides an easy to use text based interface to change the grammar. You can simply list all the allowed sentences (without any punctuation marks, obviously) like described above.



When selecting a sentence on the left, the right pane will automatically show possible real sentences with the words of your vocabulary on the right.

The example section will list at most 35 examples so if more than that amount of sentences match the selected grammar entry, the list might not be complete.

Import a Grammar

Additionally to simply entering your desired grammar sentence by sentence, Simon is able to automatically deduce allowed grammar structures by reading plain text using the Import Grammar wizard.



Simon can read and import text files but also provides an input field if you want to simply type the text into Simon.

Say we have a vocabulary like in the general section above:

Table 4.5. Improved Sample Vocabulary

WordCategory
ComputerTrigger
InternetCommand
MailCommand
closeCommand


We want Simon to recognize the sentence Computer Internet!. So we either enter the text using the Import text option or create a simple text file with this content Computer Internet! (any punctuation mark would work) and save it as simongrammar.txt to use the Import files option.







Simon will then read the entered text or all the given text files (in this case the only given text file is simongrammar.txt) and look up every single word in both active and shadow dictionary (the definition in the active dictionary has more importance if the word is available in both). It will then replace the word with its category.

In our example this would mean that he would find the sentence Computer Internet. Simon would find out that Computer is of the category Trigger and Internet of the category Command. Because of this Simon would learn that Trigger Command is a valid sentence and add it to its grammar.

The import automatically segments the input text by punctuation marks (., -, !, etc.) so any natural text should work. The importer will automatically merge duplicate sentence structures (even across different files) and add multiple sentence (all possible combinations) when a word has multiple categories assigned to it.

The import will ignore sentences where one or more words could not be found in the language model unless you tick the Also import unknown sentences check box in which case those words are replaced with Unknown.

Renaming Categories

The rename category wizard allows you to rename categories in both your active vocabulary, your shadow dictionary and the grammar.



Merging Categories

The merge category wizard allows you to merge two categories into one new category in both your active vocabulary, your shadow dictionary and the grammar.



This functionality is especially useful if you want to simplify your grammar structures.