12. Give the text parser the same vocabulary
On this page
The parser gives the player another route into the same commands. A mouse player can choose Look and click a clock. A typing player can enter please examine the timepiece.
Three authored choices make that sentence work:
| Sentence part | Where it is defined |
|---|---|
| examine | A synonym of the Look verb. |
| timepiece | A synonym of the clock object. |
| please, the | Words removed by the parser's ignored-word settings. |
Give the target a useful synonym#
Select the clock in the Scene Designer and find its Synonyms field in the object's general settings. Add clock, timepiece, grandfather clock if those words suit your object. Apply Changes and Save Project.
Verb synonyms identify commands. Object synonyms identify targets. Putting timepiece in Look's synonym field would mix up those jobs.
Use Command Preview#
1. Open Text Parser Designer from its toolbar icon or project workspace.
2. Check Enable Text Parser.
3. Review Words to Ignore. Words such as a, an, the, please and at are useful starting points.
4. Click Apply Parser Settings after changing the parser settings, then Save Project.
5. In Command Preview, enter please examine the timepiece.
6. Read the cleaned command, matched verb and matched target.
