Skip to content

Commit 2250f1b

Browse files
committed
[docs] Remove usages of deprecated syntax in complex examples and fix broken one
1 parent 665025f commit 2250f1b

9 files changed

+119
-123
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Potential error when using random generation modifier (PR [#49](https://github.com/SimGus/Chatette/pull/49))
1515
- Crash when having an annotation on a slot or alias
1616
- Potential crash when logging a syntax error
17+
- Usage of deprecated syntax in complex examples
1718

1819
### Deprecated
1920
- Python versions 2.7 and <=3.2

examples/complex/airport/aliases.chatette

+17-17
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,44 @@
55
~[help#noun]
66
help
77
aid
8-
8+
99
~[me]
10-
{me/us}
11-
10+
[me|us]
11+
1212
~[i need]
13-
[&i]{'d/ would?} {need/want}
14-
[&i]{'d/ would} like
13+
[&i]['d| would?] [need|want]
14+
[&i]['d| would] like
1515

1616
~[can you]
1717
can you
1818
could you
1919
would you [be so kind and?]
20-
20+
2121
~[thing#singular]
22-
{thing/stuff}
22+
[thing|stuff]
2323
~[thing#plural]
24-
{kind of/type of} {things/stuff}
25-
26-
24+
[kind of|type of] [things|stuff]
25+
26+
2727
~[book]
2828
book
2929
register
30-
30+
3131
~[from airport]
3232
from @[source-airport]
3333
~[to airport]
3434
[to go?] to @[source-airport]
35-
35+
3636

3737
~[this]
3838
this
3939
that
4040
it
41-
41+
4242
~[be]
4343
is
44-
{will/would} be
45-
44+
[will|would] be
45+
4646
~[for nb people]
47-
for {@[nb-people$one]/@[nb-people$1]}
48-
47+
for @[nb-people]
48+

examples/complex/airport/master.chatette

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
~[i need?] ~[help#noun] [please?]
44
~[help#verb] ~[me] [please?]
55
~[can you] ~[help#verb] ~[me] [please?][\??]
6-
what ~[thing] ~[can you] {do/help ~[me] with}[\??]
6+
what ~[thing] ~[can you] [do|help ~[me] with][\??]
77

88
%[&book](training:12, testing:4)
99
~[i need?polite] [to?polite] ~[book] a flight ~[from airport?] ~[to airport] @[departure-time?] [please?]
1010
~[can you] ~[book] a flight [for?for me] ~[me?for me] ~[from airport?] ~[to airport] [please?][\??]
11-
11+
1212
%[&number-tickets](train : 4)
13-
~[this] ~[be] ~[for nb people][.?]
14-
13+
~[this] ~[be] for @[nb-people][.?]
14+
1515
%[&thank](2)
1616
Thank you
1717
Thanks [a lot?]

examples/complex/airport/slots/nb-people.chatette

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Slot for the number of people to book a flight for
22
// This slot uses arguments
33
@[nb-people]
4-
{~[nb$1]/~[nb$one]} person = 1
5-
{~[nb$2]/~[nb$two]} people = 2
6-
{~[nb$3]/~[nb$three]} people = 3
7-
{~[nb$4]/~[nb$four]} people = 4
8-
{~[nb$5]/~[nb$five]} people = 5
9-
{~[nb$6]/~[nb$six]} people = 6
10-
4+
[~[nb$1]|~[nb$one]] person = 1
5+
[~[nb$2]|~[nb$two]] people = 2
6+
[~[nb$3]|~[nb$three]] people = 3
7+
[~[nb$4]|~[nb$four]] people = 4
8+
[~[nb$5]|~[nb$five]] people = 5
9+
[~[nb$6]|~[nb$six]] people = 6
10+
1111
~[nb$NB]
1212
exactly $NB
1313
precisely $NB

examples/complex/metal-work/aliases.chatette

+39-39
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
; This file shouldn't be fed directly to the Chatette generator
2-
; (it will be included inside the master file)
3-
; Contains the aliases definitions
1+
// This file shouldn't be fed directly to the Chatette generator
2+
// (it will be included inside the master file)
3+
// Contains the aliases definitions
44

5-
;=============== Aliases definitions =====================
6-
;-------------- Usual utilities ------------------
5+
//=============== Aliases definitions =====================
6+
//-------------- Usual utilities ------------------
77
~[greet]
88
hi
99
hello
@@ -38,7 +38,7 @@
3838
yes
3939
ok
4040
okay
41-
;alright
41+
//alright
4242
~[no]
4343
no
4444

@@ -49,18 +49,18 @@
4949
absolutely
5050
right
5151
~[that's it]
52-
that is {it/correct/right}
53-
that's {it/correct/right}
52+
that is [it|correct|right]
53+
that's [it|correct|right]
5454

5555
~[disagree]
5656
no ~[that's wrong?]
5757
~[that's wrong]
58-
~[i] {didn't/did not} say that
58+
~[i] [didn't|did not] say that
5959
~[that's wrong]
60-
that is {not it/wrong/incorrect}
61-
that's {not it wrong/incorrect}
60+
that is [not it|wrong|incorrect]
61+
that's [not it wrong|incorrect]
6262

63-
;------------- Question utilities -----------------
63+
//------------- Question utilities -----------------
6464
~[what is#singular]
6565
what ~[is#no elision]
6666
what~[is#elision]
@@ -70,7 +70,7 @@
7070

7171
~[why]
7272
why
73-
for {what/which} reason
73+
for [what|which] reason
7474

7575
~[what caused]
7676
what caused
@@ -102,30 +102,30 @@
102102
showing me
103103
reporting
104104

105-
;------------- Inform utilities --------------
105+
//------------- Inform utilities --------------
106106
~[i]
107107
i
108108
I
109109
~[i said]
110110
~[i] said
111-
;~[i] {am/was} saying
111+
//~[i] [am|was] saying
112112
it was
113113
it is
114114
it's
115115

116116

117-
;------------- Other utilities ---------------
117+
//------------- Other utilities ---------------
118118
~[named#singular]
119-
{which is/that is?} named
120-
{which is/that is?} called
121-
{which is/that is?} labeled
122-
{which is/that is?} labelled
119+
[which is|that is?] named
120+
[which is|that is?] called
121+
[which is|that is?] labeled
122+
[which is|that is?] labelled
123123
whose name is
124124
~[named#plural]
125-
{which are/that are?} named
126-
{which are/that are?} called
127-
{which are/that are?} labeled
128-
{which are/that are?} labelled
125+
[which are|that are?] named
126+
[which are|that are?] called
127+
[which are|that are?] labeled
128+
[which are|that are?] labelled
129129
whose name is
130130

131131
~[such that]
@@ -139,12 +139,12 @@
139139
~[such that] would be
140140
~[such that]'d be
141141

142-
;------------- Planning ---------------------
142+
//------------- Planning ---------------------
143143
~[planning]
144144
planning
145145
schedule
146146
~[planning of]
147-
~[planning] {of/for}
147+
~[planning] [of|for]
148148

149149
~[fully]
150150
fully
@@ -159,20 +159,20 @@
159159
~[planned at$PERCENT]
160160
planned at [only?] $PERCENT\%
161161
planned up to [only?] $PERCENT\%
162-
~[completed] {at/up to} [only?] $PERCENT\%
162+
~[completed] [at|up to] [only?] $PERCENT\%
163163

164164
~[finished]
165165
finished
166-
;over
166+
//over
167167
done
168168
completed
169169
~[completed]
170170
done
171171
completed
172172

173-
;------------ Production lines ----------------
173+
//------------ Production lines ----------------
174174
~[production line]
175-
{prod/production?} line
175+
[prod|production?] line
176176

177177
~[line name#hot strip mill]
178178
hot [strip?] mill
@@ -187,7 +187,7 @@
187187
paint
188188
~[line name#slitting]
189189
slitting
190-
~[line name#packing] ; Note: is it packing or packaging?
190+
~[line name#packing] // Note: is it packing or packaging?
191191
packing
192192
~[line name#shipping]
193193
shipping
@@ -196,31 +196,31 @@
196196

197197
|prod_lines.chatette
198198

199-
;-------------- Orders --------------------
199+
//-------------- Orders --------------------
200200
~[order#singular]
201201
order
202202
command
203203
~[order#plural]
204204
orders
205205
commands
206206

207-
;------------- Time ------------------------
207+
//------------- Time ------------------------
208208
~[late]
209209
~[finished?] [too?] late
210210
~[finished?] behind schedule
211211
not on time
212212
[long-?]overdue
213213
[long-?]delayed
214-
;[long-?]behindhand
215-
;[long-?]belated
216-
;tardy
214+
//[long-?]behindhand
215+
//[long-?]belated
216+
//tardy
217217

218218
~[on time]
219219
~[finished?] on time
220220
~[finished?] in [good?] time
221-
~[finished?] {on/to} schedule
221+
~[finished?] [on|to] schedule
222222

223-
;----------- Utilization -------------------
223+
//----------- Utilization -------------------
224224
~[fully used]
225225
~[fully] used
226226
~[fully] utilized
@@ -229,7 +229,7 @@
229229
not utilized
230230

231231
~[used at$PERCENT]
232-
{used/utilized} {at/up to} [only?] $PERCENT\%
232+
[used|utilized] [at|up to] [only?] $PERCENT\%
233233

234234
~[utilization$PERCENT]
235235
[up to?] [only?] $PERCENT[\%?]
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
; This file shouldn't be fed directly to the Chatette generator
2-
; (it will be included inside the master file)
3-
; Contains information about the client
4-
; !!! Client: La Louvière !!!
1+
// This file shouldn't be fed directly to the Chatette generator
2+
// (it will be included inside the master file)
3+
// Contains information about the client
54

65
~[client factory name]
76
[&La] [&Louviere]
8-
;[&La] [&Louvière] ; Non-ascii characters may be a problem with python 2
7+
//[&La] [&Louvière] // Non-ascii characters may be a problem with python 2
98

109
~[partner factory name]
1110
[&Strasbourg]
+22-24
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2-
; File to feed to the Chatette generator (https://github.com/SimGus/Chatette) ;
3-
; Contains templates to generate datasets for Rasa NLU ;
4-
; Master file ;
5-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1+
/////////////////////////////////////////////////////////////////////////////////
2+
// File to feed to the Chatette generator (https:||github.com|SimGus|Chatette) //
3+
// Contains templates to generate datasets for Rasa NLU //
4+
// Master file //
5+
/////////////////////////////////////////////////////////////////////////////////
66

7-
;=============== Includes ===================
7+
//=============== Includes ===================
88
|client_info.chatette
99
|aliases.chatette
1010
|slots.chatette
1111

12-
;=============== Intents definitions ======================
13-
;-------------- Intermediate answers -----------------
12+
//=============== Intents definitions ======================
13+
//-------------- Intermediate answers -----------------
1414
%[affirm](20)
1515
~[agree]
1616
%[deny](15)
1717
~[disagree]
1818

1919
%[&inform_production_line](200)
20-
{~[yes],/~[no],?} ~[i said?] @[production_line#long] @[line_number#long?][.?]
21-
{~[yes],/~[no],?} ~[i said?] @[production_line#acronym] @[line_number#short?][.?]
20+
[~[yes],|~[no],?] ~[i said?] @[production_line#long] @[line_number#long?][.?]
21+
[~[yes],|~[no],?] ~[i said?] @[production_line#acronym] @[line_number#short?][.?]
2222
%[&inform_line_number](70)
23-
{~[yes],/~[no],?} ~[i said?] @[line_number]
23+
[~[yes],|~[no],?] ~[i said?] @[line_number]
2424

2525
%[&inform_filter_time](120)
26-
{~[yes],/~[no],?} ~[i said?] @[filter_time]
27-
; Missing completion here
26+
[~[yes],|~[no],?] ~[i said?] @[filter_time]
27+
// Missing completion here
2828
%[&inform_utilization](180)
29-
{~[yes],/~[no],?} ~[i said?] @[utilization#number only]
29+
[~[yes],|~[no],?] ~[i said?] @[utilization#number only]
3030

31-
;--------------- Queries ----------------------
31+
//--------------- Queries ----------------------
3232
%[&query_machine_planning](1300)
3333
~[what is#singular] the ~[planning of] @[production_line#long] @[line_number#long?]~[question mark?]
3434
~[what is#singular] the ~[planning of] @[production_line#acronym] @[line_number#short?]~[question mark?]
@@ -43,15 +43,13 @@
4343
~[ask?] [all?] the ~[order#plural] ~[such that are] @[filter_completion][ please?]~[question mark?]
4444

4545

46-
;--------------- Analysis ----------------------
46+
//--------------- Analysis ----------------------
4747
%[&why_machine_utilization](1500)
48-
~[why] is @[production_line#long] @[line_number#long?] {@[utilization#positive]/@[utilization#negative]}~[question mark?]
49-
~[why] is @[production_line#acronym] @[line_number#short?] {@[utilization#positive]/@[utilization#negative]}~[question mark?]
50-
~[why] ~[auxiliary#no elision] @[production_line#long] @[line_number#long?] be {@[utilization#positive]/@[utilization#negative]}~[question mark?]
51-
~[why] ~[auxiliary#no elision] @[production_line#acronym] @[line_number#short?] be {@[utilization#positive]/@[utilization#negative]}~[question mark?]
48+
~[why] is @[production_line#long] @[line_number#long?] [@[utilization#positive]|@[utilization#negative]]~[question mark?]
49+
~[why] is @[production_line#acronym] @[line_number#short?] [@[utilization#positive]|@[utilization#negative]]~[question mark?]
50+
~[why] ~[auxiliary#no elision] @[production_line#long] @[line_number#long?] be [@[utilization#positive]|@[utilization#negative]]~[question mark?]
51+
~[why] ~[auxiliary#no elision] @[production_line#acronym] @[line_number#short?] be [@[utilization#positive]|@[utilization#negative]]~[question mark?]
5252
~[ask] ~[why] @[production_line#long] @[line_number#long?] ~[is#no elision] @[utilization#positive]~[question mark?]
5353
~[ask] ~[why] @[production_line#acronym] @[line_number#short?] ~[is#no elision] @[utilization#positive]~[question mark?]
54-
~[what caused] @[production_line#long] @[line_number#long?] to be {@[utilization#positive]/@[utilization#negative]}~[question mark?]
55-
~[what caused] @[production_line#acronym] @[line_number#short?] to be {@[utilization#positive]/@[utilization#negative]}~[question mark?]
56-
57-
;--------------- Recommendations ----------------
54+
~[what caused] @[production_line#long] @[line_number#long?] to be [@[utilization#positive]|@[utilization#negative]]~[question mark?]
55+
~[what caused] @[production_line#acronym] @[line_number#short?] to be [@[utilization#positive]|@[utilization#negative]]~[question mark?]

0 commit comments

Comments
 (0)