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 6 : Working with SIML Events
SIML Events allows to trigger special evaluation of responses in SIML files
In SIML files you define an event with the EVENT tag
[Event]
[Pattern]TEST-EVENT[/Pattern]
[Response]Event Raised.[/Response]
[/Event]
In SIML files , you can trigger the event TEST-EVENT with the RAISE tag :
[Model]
[Pattern]RAISE EVENT[/Pattern]
[Response]
[Raise]test-event[/Raise]
[/Response]
[/Model]
Response of the bot to user message "Raise event" will be "Event Raised" Response of the bot will be sent and managed by the plugin as the response to a normal query
Raising SIML events in EZ Builder scripts
You can raise SIML events in EZ Builder scripts :
Raisebotevent("bot event id")
Or
$Botevent= "bot event id"
ControlCommand("Synbot Plugin", Raiseevent)
Where bot event id is the pattern of the SIML event
Raisebotevent("test-event")
Will raise the test-event event. Response of the bot will be "Event Raised"
See for example User Input recognition for "What do you See" which call an EZBuilder Script with use of Cognitive Vision Plugin.
[Case Value="CAMERA_RECOGNITION"][Var Set="EZscript"]Start Bing Vision Recognition[/Var][Var Set="mess1"]|Waiting for Bing Vision recognition[/Var][/Case]
Synbot Event is set in this script .
if (!$IsCameraActive)
ControlCommand("Camera", CameraStart)
sleep(1000)
endif
ControlCommand("Cognitive Vision", Detect)
sleep(500)
$botevent = "Return from Bing Vision Event"
ControlCommand("Synbot Plugin", Raiseevent)
Model is coded for this event in order to process Cognitive vision plugin answer (especially translate it for french language).
[Event]
[Pattern]
[!--Event set by EZscript Script in script Manager Start Bing Vision Recognition after execution of Bing Vision recognition
Only in english - so need to be modified to include the [x:Translate] which is in testing
Need to be also modified if Bing result are Empty
--]
[Item]RETURN FROM BING VISION EVENT[/Item]
[/Pattern]
[Response xml:space="preserve"]
[Think]
[Var Set="Visiondescription"][x:EZvar Get="VisionDescription" /][/Var]
[Var Set="Visionconfidence"][x:EZvar Get="VisionConfidence" /][/Var]
[Var Set="Visiondescriptionfr"][x:Translate][Var Get="Visiondescription" /][/x:Translate][/Var]
[If Var="Visionconfidence" Not="0"]
[Switch User="Userlanguage"]
[Case Value="fr"]
[Var Set="Visiondescription"][x:Translate][Var Get="Visiondescription" /][/x:Translate][/Var]
[Var Set="Temp"] Je vois [/Var][Var Set="Temp1"]avec une certitude de [/Var][Var Set="Temp2"] pourcent[/Var][/Case]
[Case Value="en"]
[Var Set="Temp"]I See [/Var][Var Set="Temp1"]with a level of confidence of [/Var][Var Set="Temp2"] percent[/Var][/Case]
[/Switch]
[Var Set="Messresponse"][Var Get="Temp" /]_[Var Get="Visiondescription" /]_[Var Get="Temp1" /]_[Var Get="Visionconfidence" /][Var Get="Temp2" /][/Var]
[/If]
[Else]
[Switch User="Userlanguage"]
[Case Value="fr"][Var Set="Messresponse"]Je ne peux rien voir[/Var][/Case]
[Case Value="en"][Var Set="Messresponse"]I cannot see anything[/Var][/Case]
[/Switch]
[/Else]
[/Think]
[Var Get="Messresponse" /]
[/Response]
[/Event]
Below the result ....

