WordList

From LINKS - Documentation
Jump to: navigation, search

Word lists allows you to create complex commands. Or commands that would seem as natural language.

It allows you to figure out specific keywords you say in the command.

For example, if we have two commands Turn on/off the light, WordList will allow us to make this one command.

We can use WordList in place of "on/off" and figure out if we said "on" or "off" and pass it to a script, etc...

See this example to create a WordList command.


Another advantage of WordList is that we can store multiple columns of data for a specific word.

Let's say... we want to convert the word one to number 1

We can map that in the WordList and get desired results.


Another example... convert a song name to a URL

We can do the same here... map the song name with a url or as much info of columns we need.


Grammar: open {site=websites}

In Grammar we are defining the site WordList where websites is a text file saved under LINKS\Data\WordList folder.

Response: opening {site}

In Response {site} will be replaced from first column of the text file.

Action: {{site}}

In Action {{site}} will be replaced with second column of the text file.


We can have as many columns as we need.

If we use more than 2 columns, then we need to use GetWord function to get 2+ column.

To get third or x column... use [GetWord("Text File Name","{WordListName}","Column Header Name")]


A WordList text file example:

Grammar Value Size
milk Milk 1 Gallon
bread Some brand bread Family
detergent Some brand pods detergent 40+
The columns needs to be separated by tabs when saving as text file.

Some more features...

Grammar Value
Blank
[dictation] Dictation
[spelling] Spelling
[*] Wildcard
The blank grammar allows you to make the WordList optional.
[dictation] allows you to dictate any thing instead of a specific word.
[spelling] allows you to spell a word.
[*] allows you to dictate gibberish instead of a real word/phrase.

Note: Dynamic commands are not allowed on the default "Start Listening" and "Stop Talking" functions.

Warning: Please use this responsibly. Check one command at a time. One bad WordList command can kill all WordList commands.