Synbot Plugin Tutorial - interface to Syn Bot Software

Step 11 : Pattern Reductions

Using Pattern reductions

In the Pattern Reductions SIML file , you can specify patterns which will be evaluate first for every User Input to the Bot.Look at the example file delivered in which pattern reduction is used to specify several common syntax forms for a request.COULD YOU TELL ME - CAN YOU GIVE US - I WOULD LIKE YOU TO GIVE - I JUST WANT YOU TELL ME - I WANT TO KNOW - COULD I KNOW - GIVE US - TELL ME - .....

User Input I WANT TO KNOW WHAT IS YOUR NAME will in this case switch to the evaluation of Pattern WHAT IS YOUR NAME due to the Goto tagVariables values can be set in the Pattern Reductions Models in ordered to be tested in the switched Pattern Model.Personnal framework example include automatic setting of some SIML variables Flags Typego1 to Typego15 , depending on the verb used.

Different User input structures are taken into account in the example models :. For kind of verbs configured in map CURRENT_VERB_1_ENPhrase structure of type : can you give me , could you tell us , can you give , could you tell , I would like you give , I just want you tell , we wish you giveI would like you give me , I just want you tell us , we wish you give us , give me , tell us , give , tell. For kind of verbs configured in map CURRENT_VERB_2_EN and Conjugate form im map CURRENT_VERB_2_FORM2_ENPhrase structure of type : can I know , could we have , I would like to know , we wish to have , do you have , do you know. For kind of verbs configured in map CURRENT_VERB_3_ENPhrase structure of type : can you learn that , I would like you learn that, I just want you learn that , we wish you learn that , learn that.

Entry key is flag index|verb keyword , for example if we found the verb tell in input pattern , variable flag Typego1 will be set to 1.Verbs are limited to verbs configured in pattern reduction example (maps CURRENT_VERB_1_EN , CURRENT_VERB_2_EN , CURRENT_VERB_3_EN and same suffixed by fr for french language) Variable flag Typego is also Set to 1 if a verb pattern reduction is applied.

For example , For input "Give me your voltage" - Pattern activated will be "XXXXXFROMPATTERNREDUCTION1 your voltage" with Typego and Typego2 set to 1.For Input "talk us your voltage" , pattern activated will be the same with Typego2 set to empty string.In the "XXXXXFROMPATTERNREDUCTION1 your voltage" pattern model, we can so test typego2 variable and reject the incorrect input phrase "talk us your voltage"

Example can be found in EZ Robot Request - Queries SIML File.Note The test included for Typego11 - in order to redirect to correct pattern because entries in the 2 maps VARIABLE_VALUE_EN and direct_question_object_en can be the same.and for this entries pattern [Item]XXXXXFROMPATTERNREDUCTION1 [MAP:VARIABLE_VALUE_EN] * TO *[/Item] will never be activated.