Plugin rules
As A.V.A.T.A.R is a multi-language application, and in order to have a language-independent correspondence of rules, rules are obligatorily written in English. English is also the language of choice for Natural Language Processing.
A.V.A.T.A.R incorporates its own natural language processing, providing a convenient way to search for and match sentence parts with a dictated rule.
Matches
Below are matches that can be used to write a rule:
Correspondence | Description | Rule | Sentence | match |
---|---|---|---|---|
Basic matching | The rule must correspond exactly to a sequence in the sentence |
what time is it |
what time is it |
![]() |
what time is it in Paris |
![]() |
|||
please what time is it exactly |
![]() |
|||
what time |
![]() |
|||
Any one term | The . character means any one term |
turn on . light |
turn on the light |
![]() |
turn on the led light |
![]() |
|||
All terms until | The * means all terms until - it may be 0 | turn on * light |
turn on the light |
![]() |
turn on the led light |
![]() |
|||
Options-list - () | (word1|word2) parentheses allow listing possible matches for the word. - ( 'OR' logic ) |
going to (bed|sleep) |
going to bed |
![]() |
going to sleep |
![]() |
|||
First | The ^ character means something should be in the start of a match |
^John eats glue |
John eats glue |
![]() |
Mister John eats glue |
![]() |
|||
Last | The $ character means something should be in the end of a match |
am going$ |
i am going |
![]() |
i am going to the bed |
![]() |
|||
Root matches | {} characters mean the 'root' 'stemmed' version of the word The root form of a #Verb is an #Infinitive form. |
{go} to bed |
i am going to bed |
![]() |
i went to bed |
![]() |
|||
i will go to bed |
![]() |
|||
Regex suffix lookup |
Looks for sub-word matches with the regex / / characters |
/nny$/ |
tell me a funny story |
![]() |
tell me a story |
![]() |
|||
Regex infix lookup |
Looks for sub-word matches with the regex / / characters |
/stor/ |
tell me a story |
![]() |
tell me a joke |
![]() |
matches can be associated, for example:
{go} * bed ==> the 'root' version of "go" and all terms until bed
{go} * bed$ ==> the 'root' version of "go" and all terms until bed and bed is the last term
{go} * (bed|sleep) ==> the 'root' version of "go" and all terms until bed OR sleep
^{go} . (bed|sleep) ==> the 'root' version of "go" must be in the start and only one term until bed OR sleep
Manage rules
Each plugin has a properties file in .json
format where rules are defined:
app/
core/
plugins/
<plugin>/
<plugin>.prop
Tip
Manage plugin rules and properties via the Plugin Studio interface !