Synbot Plugin Tutorial - interface to Syn Bot Software

EZ Robot Commands SIML Framework - Configuration - Free Attribute

Free Attribute

Structure of [free Attribute] can be either [Attribute text] or [preposition] [article] [attribute text] As seen above When [free Attribute] is possible or mandatory for a [Verb][Complement][Attribute][Position] entry in Combination SIML Map,

More informations need to be set in the entry content mainly which type of decoding and control is done on the [Free attribute] structure - No control or DECODE0 or DECODE1 or DECODE2 With No control - [Attribute text] = [Free Attribute] - No decoding is done on [free Attribute] content. With DECODE0 DECODE1 and DECODE2 , [free Attribute] content is analysed and decoded as syntactic structure [preposition] [article] [attribute text]

Word 6 of entry content is used to specify SIML Map Name in which [attribute text] value can be configured. Word 9 specify control format on [attribute text] if no entry in the previous control map or if no map specified (Value "EMPTY" in Word 6)

With DECODE2 type mnemonic keyword found for the corresponding [attribute text] entry in map genre_name replace as key [attribute text].

Structure of these SIML Maps must respect following rules : . Map entry is structured as "Language code|Attribute Text" where language code can be 0 if entry is applicable to all languages. . 3 Entry content types can be used. If the first character of Value Content is not % , entry will be linked to the value. Otherwise the second character after % specify the entry content type - 1 2 or 3

Type 1 Word 2 can be EMPTY , USER or BOT Case EMPTY value, you find in word 3 the signifiant content value
Case USER or BOT value, word 3 specify name of a user or bot variable. Signifiant content value for the entry will be found in the same map with key 0|value of user or bot variable.

[Map Name="mailuser"]
    [MapItem Content="en|my wife" Value="%1 USER wife" /]
    [MapItem Content="0|Jean luc" Value="%1 EMPTY jeanlucben29@gmail.com" /]
    [MapItem Content="0|Helen" Value="%1 EMPTY helenben29@gmail.com" /]
    [MapItem Content="0|XXXXXCURRENTUSERNAME" Value="%1 USER Name" /]

In this example signifiant content value is mail adress - entry en|my wife links to 0|value of User variable Wife If value of User variable wife is Helen - Entry 0|Helen will be searched to get the mail adddress.

Type 2 Word2 can be EMPTY or a mnemonic which will be used as suffix preceded by _ in Bot response message building "workflag" variable structure.

[Map Name="Stopcomplement"]
    [MapItem Content="fr|de chanter" Value="%2 SING" /]
    [MapItem Content="fr|de danser" Value="%2 DANSE" /]
    [MapItem Content="fr|de parler" Value="%2 SOUND" /]
    [MapItem Content="en|singing" Value="fr|de chanter" /]
    [MapItem Content="en|dansing" Value="fr|de danser" /]
    [MapItem Content="en|talking" Value="fr|de parler" /]

Type 3 Word 2 is a mnemonic key value Word 3 is the name of a SIML Map where signifiant content information linked to the text attribute value are stored with the key value of word 2. Content value structure of this map can be whatever you want (You will need to interprate it in the corresponding SIML Code) For example

[Map Name="song"]
    [MapItem Content="fr|joyeux anniversaire" Value="0|happy birthday" /]
    [MapItem Content="0|happy birthday" Value="%3 happy_birthday mp3_song" /]
[Map Name="mp3_song"]
    [MapItem Content="happy_birthday" Value="% Official_Songs 9" /]
[/Map]

In mp3_song map you find in the content entry EZB soundboard name and track number.

Some TIPS for using [Free attribute]

If you want to have plural names decoding with DECODE1 or DECODE2 type , you need to create the corresponding entry in maps name_pluriels_language code

  [Map Name="name_pluriels_en" Reverse="name_pluriels_reversed_en"]
    [MapItem Content="nightingales" Value="nightingale" /]
    [MapItem Content="lions" Value="lion" /]
    [MapItem Content="birds" Value="bird" /]
    [MapItem Content="tigers" Value="tiger" /]

If so plural form will be decoded in singular form as set in the entry map content en genre will be set to "P"

You can have more control in using DECODE2 Type, but you need to create an entry in map genre_name :

 [Map Name="genre_name"]
    [MapItem Content="fr|rossignol" Value="%MM nightingale" /]
    [MapItem Content="fr|lion" Value="%MM lion" /]
    [MapItem Content="fr|lionne" Value="%FF lion" /]

Key entry is Language code|decode name. Entry content structure is : Char 1 : % char 2 : genre of name char 3: genre Word 2 : mnemonic keyword for entry. You can see in the example than lionne and lion have the same mnemonic keyword. This mnemonic keyword is used instead of [attribute Text) in accessing the Control Map configure for [Free Attribute] interpretation.

As example Entries in Map combination_verb_comp_att_pos

[MapItem Content="fr|DO|CRY|EMPTY|EMPTY" Value="% FREENEEDDECODE2 NO EMPTY EMPTY animalcry OF ALL EMPTY messwhat" /]
[MapItem Content="en|DO|CRY|EMPTY|EMPTY" Value="% FREENEEDDECODE1 NO EMPTY EMPTY animalcry OF ALL EMPTY messwhat" /] 

Note that we are using DECODE1 for english language and DECODE2 for french. Control map is map Animalcry.

 [Map Name="animalcry"]
    [MapItem Content="0|LION" Value="%3 LION mp3_animalcry" /]
    [MapItem Content="0|TIGER" Value="%3 TIGER mp3_animalcry" /]
  [/Map]

Entries LION and TIGER are used for french and english languages. In English, key link directly to the [Attribute Text] decoded with DECODE1 type.

In Map genre_name, only entries for french language are set with mnemonic Lion and Tiger, allowing to have the same keys as for english language. If we decided to use DECODE2 type for english language , corresponding entries will need to be set in map genre_name with en|prefix. And Plural form entries are set in the corresponding name_pluriels_fr and name_pluriels_en maps.

In this example - following [free text] inputs will be correctly recognized with the same result : In french : du lion , d'un lion , de la lionne , d'une lionne , des lions , des lionnes In english : from lion , from the lion , from a lion , from lions , from the lions


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming