From 0861dd280e0f411022c4844ff1ddf92e1a0e6173 Mon Sep 17 00:00:00 2001 From: Vu Bao Nhu Date: Fri, 25 Jun 2021 01:28:50 +0000 Subject: [PATCH 1/2] spec_definition: extend capacity --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2bb2111..b051f5d 100644 --- a/README.md +++ b/README.md @@ -25,15 +25,16 @@ To get started playing with BotScript, you must follows the following rules: ## definition -A `definition` is an identifier of an entity, a list or a variable. +A `definition` is an identifier of an entity, a group, a list or a property. The syntax start with symbol `!`: ```bash -! name CuteBot +! name +- CuteBot ``` -The `CuteBot` is value of the variable `name`. +The `CuteBot` is value instance of the property `name`. Think of bots with many names! To define a list of items, just enter item in a new line which started with symbol `-`: @@ -44,6 +45,22 @@ To define a list of items, just enter item in a new line which started with symb - blue ``` +Also, you can define intents by data samples as following: + +! intent:goodbye +- bye +- goodbye +- see you around +- see you later +- talk to you later + +! intent:ask_identity +- who are you +- what is your name +- how should i address you +- may i know your name +- are you a bot + ## comment Comments make your code clearer, you can add a comment in BotScript document by starting the symbol `#` at the begining of a line or followed by a space: From 989ce29663972302359a2b020b9f570738e9a6d4 Mon Sep 17 00:00:00 2001 From: Vu Bao Nhu Date: Fri, 25 Jun 2021 01:30:56 +0000 Subject: [PATCH 2/2] update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b051f5d..b24b877 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ To define a list of items, just enter item in a new line which started with symb Also, you can define intents by data samples as following: +```bash ! intent:goodbye - bye - goodbye @@ -60,6 +61,7 @@ Also, you can define intents by data samples as following: - how should i address you - may i know your name - are you a bot +``` ## comment