Jlucben
Steps
- Introduction : Discover Synthetic Intelligence Network Bot development framework
- Step 1 : Install Synthetic Intelligence Network software
- Step 2 : Create a SIML project and install SIML example files
- Step 3 : Install , configure and use the Synbot Plugin in EZ Builder
- Step 4 : Manage the dialog with the Bot
- Step 5 : Working with Synbot SIML variables
- Step 6 : Working with SIML Events
- Step 7 : Accessing in SIML to EZ Builder variables and EZ Builder Command
- Step 7 bis : Working with Bot Emotions
- Step 7 Ter: Bot Save Directory and Learning Models
- Step 8 : Advanced Plugin Configuration options
- Step 9 : Adding new SIML Tags to the language
- Step 10 : New SIML Tags added in the Plugin - Wikipedia Search , Translate , Twitter , Mail , .......
- Step 11 : Pattern Reductions
- Step 12 : SIML Tips and Tricks
- Step 13 : EZ Robot Commands SIML Framework
- EZ Robot Commands SIML Framework - Configuration
- EZ Robot Commands SIML Framework - Configuration - Managing movement speed and duration
- EZ Robot Commands SIML Framework - Configuration - Verb
- EZ Robot Commands SIML Framework - Configuration - Complement and Attribute
- EZ Robot Commands SIML Framework - Configuration - Position
- EZ Robot Commands SIML Framework - Configuration - Authorized Combination
- EZ Robot Commands SIML Framework - Configuration - Free Attribute
- EZ Robot Command SIML Framework - Configuring the Bot Response Message
- EZ Robot Commands SIML Framework - New command creation step to step
- Plugin and Framework Roadmaps
Step 7 bis : Working with Bot Emotions
Emotions can be configured in SIML File EMOTIONML in Settings Folder.
Setting the value of Bot Emotion :
During a bot session , Bot emotion can be set either in SIML Bot files or in EZ Builder scripts. Variable value type is always a string type. If the variable doesn't exit , it is created.
In SIML : [BotEmotion ID="Sad" /] In EZ Builder Scripts :
Setbotemotion("Emotion ID")
or for using in Blockly
$Botemotion = "Emotion ID"
ControlCommand("Synbot Plugin", Setbotemotion)
Getting the value of Bot Emotion :
In SIML : [BotEmotion Get="id" /] In EZ Builder Scripts :
Gettbotemotion()
or for using in Blockly
ControlCommand("Synbot Plugin", Getbotemotion)
Result value is returned in $Botemotion EZB variable
Synbot plugin Configuration:
Whenever Bot Emotion value is changed , value of $Botemotion EZB variable is updated. You can also in plugin Configuration Form specify a default init value for Bot Emotion which will be set when you start the Bot Session. if the configured default Emotion is Empty , Bot Emotion will be saved and restore from one session to another for the same User , if the configured default Emotion is Empty.
You can also configure an EZ Builder Script which will be executed every time Bot emotion Changed.
Framework integration:
In order to demonstrate use of Bot Emotion , framework example include some new features
A new [Verb] Show Yourself in order to be able to set Bot Emotion - which is a [free attribute] Verb bbId and Verb AuthoId are set to "EMOTION" Map Emotion is used to control free attribute (3rd word in content is link to the emotion ID)
[Map Name="Emotion"]
[MapItem Content="fr|triste" Value="%1M EMPTY sad" /]
[MapItem Content="en|sad" Value="%1M EMPTY sad" /]
[MapItem Content="fr|en colère" Value="%1M EMPTY angry" /]
[MapItem Content="fr|furieux" Value="%1M EMPTY angry" /]
[MapItem Content="fr|furax" Value="%1M EMPTY angry" /]
[MapItem Content="fr|en rage" Value="%1M EMPTY angry" /]
and Map Emotion_lib is used to retrieve a label corresponding to Emotion ID and language used
[Map Name="Emotion_lib"]
[MapItem Content="fr|0|sad" Value="triste" /]
[MapItem Content="en|0|sad" Value="sad" /]
[MapItem Content="fr|0|angry" Value="en colère" /]
[MapItem Content="en|0|angry" Value="angry" /]
[MapItem Content="fr|0|bored" Value="ennuyé" /]
[MapItem Content="en|0|bored" Value="bored" /]
Action for EMOTION Workflag has been created with lauching of an EZBuilder Script
[Case Value="EMOTION"][Goto xml:space="preserve"]XXXXXXXCHANGEEMOTION[/Goto][Var Set="EZscript"]Bot Emotion Change Action[/Var][/Case]
code] [Model] [Pattern]XXXXXXXCHANGEEMOTION[/Pattern] [Response xml:space="preserve"] [Think] [Var Set="Messchangedemotion"]Messchangedemotion_[User Get="Userlanguage" /][/Var] [Var Set="emotionname"][Text WordAt="3"][User Get="Contentmapfree" /][/Text][/Var] [!--Change Bot Emotion--] [BotEmotion ID="" /] [Var Set="Messchangedemotion"]Messchangedemotion_[Var Get="emotionname" /][User Get="Userlanguage" /][/Var] [!--Test if a specific message exist for the bot emotion id--] [Var Set="Emotionanswerexisting"][Random Get="" /][/Var] [!--If not take the default message--] [If Var="Emotionanswerexisting" Value=""] [Var Set="Messchangedemotion"]Messchangedemotion[User Get="Userlanguage" /][/Var] [/If] [!--Message will be said with waiting--] [Var Set="Mess1replace" xml:space="preserve"][Random Get="" /][/Var] [/Think] [/Response] [/Model]
Some news models have been integrated in Bot Dialogs SIML file , in order to be able to query on Bot Emotion.


