Script Language: Declarations: Parser/Scanner Word Declarations


Word

Use a word declation to declare synonyms. All the synonyms will be recognized equivalently by the scanner.


     word 'look examine view inspect'
     word 'get take grab pick-up'

Notice the dash in "pick-up". It is used to declare a word sequence, or multi-word, that treats that combination of words as a synonym. (The user will not have to type in the dash, and all punctuation is treated as spaces by the scanner.) When matching a parse mask, the longest string of multi-words will be recognized first.

Ignore Word

The scanner will completly ignore the words you put in an ignore declaration. You can put common words in here to avoid testing for numerous combinations of relativley meaningless words.


     ignore 'a at the'

In many cases, a clever use of multi-words in the synonym list can match sentences with greater accuracy and validity than can be attained by ignoring words.