Skip to content

Commit

Permalink
Merge pull request #68 from yeuai/dev-spec
Browse files Browse the repository at this point in the history
spec_definition: extend capacity
  • Loading branch information
vunb authored Jun 25, 2021
2 parents 1c6500a + 989ce29 commit 926d1c6
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `-`:

Expand All @@ -44,6 +45,24 @@ 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:

```bash
! 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:
Expand Down

0 comments on commit 926d1c6

Please sign in to comment.