WordList

From LINKS - Documentation
Revision as of 05:46, 11 May 2016 by Zunair (talk | contribs)
Jump to navigation Jump to 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} Response: opening {site} Action: Template:Site

In Grammar we are defining the site WordList where websites is a text file saved under LINKS\Data\WordList folder.
In Response {site} will be replaced from first column of the text file.
In Action Template:Site will be replaced from 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")]