Skip to content

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 ok
what time is it in Paris ok
please what time is it exactly ok
what time ko
Any one term The . character means any one term
turn on . light turn on the light ok
turn on the led light ko
All terms until The * means all terms until - it may be 0 turn on * light turn on the light ok
turn on the led light ok
Options-list - () (word1|word2) parentheses allow
listing possible matches for the word.
- ( 'OR' logic )
going to (bed|sleep) going to bed ok
going to sleep ok
First The ^ character means something should be in the start of a match ^John eats glue John eats glue ok
Mister John eats glue ko
Last The $ character means something should
be in the end of a match
am going$ i am going ok
i am going to the bed ko
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 ok
i went to bed ok
i will go to bed ok
Regex
suffix lookup
Looks for sub-word matches with the
regex / / characters
/nny$/
tell me a funny story ok
tell me a story ko
Regex
infix lookup
Looks for sub-word matches with the
regex / / characters
/stor/ tell me a story ok
tell me a joke ko

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 !



Getting started