-
Notifications
You must be signed in to change notification settings - Fork 1
qiChat syntaxes and qiChatBuilder
What is QiChat?
QiChat is a script language used for verbal conversation between user and the NAO robot.
QiChat Introduction
- Topic
- Language
- Concept
- Dialog
Topic:
qiChat syntax for setting up a topic:
topic: ~introduction ()
qiChatBuilder syntax for setting up a topic:
builder.set_topic(‘introduction’)
Setting up the qiChat topic using the qiChatBuilder framework sets up the same syntax for setting up the qiChat topic above. The qiChatBuilder will also take care of adding the ‘~’ and the ‘()’ for creating a qiChat topic.
Language:
qiChat syntax for setting up a language:
language: enu
qiChatBuilder syntax for setting up a language:
builder.set_language(‘enu’)
Both qiChat and qiChatBuilder sets up the language for the Nao robot to comprehend. The qiChatBuilder syntax for setting up the language is the same as the qiChat syntax for setting up the language above. Note that ‘enu’ is the qiChat syntax for English.
Concept:
qiChat syntax for setting up a concept:
concept: (color) [red white green blue]
qiChatBuilder syntax for setting up a concept:
builder.add_concept (‘color’, [‘red’, ‘white’, ‘green’, ‘blue’])
Both qiChat and qiChatBuilder sets up the concept which is a list of words and/or phrases that refer to one idea. The qiChatBuilder syntax for setting up the concept is the same as the qiChat syntax for setting up the concept above.
Dialog:
qiChat syntax for setting up a dialog between the user and the robot:
u: (hello) hello human, pleased to meet you
qiChatBuilder syntax for setting up a dialog between the user and the robot:
builder.user_says (‘hello’)
builder. robot_dialog (‘hello human, pleased to meet you’)
Both qiChat and qiChatBuilder sets up the dialog between the user and the robot. The qiChatBuilder syntax for setting up the dialog is the same as the qiChat syntax for setting up the language above. Note, builder.user_says (‘…’) already sets up the qiChat syntax of u: (…).
Note:
There are some special characters, syntaxes, and keywords used for the qiChat / qiChatBuilder. Refer to some of the special characters and syntaxes use for qiChat found in this GitHub wiki page above.