Basit Anwer
commited on
Commit
•
e45a837
1
Parent(s):
76d05a4
Changed the docker image from spacy to full + Improved quality.
Browse files- Dockerfile +1 -1
- actions/actions.py +6 -5
- config.yml +7 -6
- data/nlu.yml +47 -2
- domain.yml +2 -2
- reviews.db +0 -0
Dockerfile
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
# Build:
|
8 |
# docker build . -t zir-ai:rasa
|
9 |
|
10 |
-
FROM rasa/rasa:2.7.1-
|
11 |
|
12 |
USER root
|
13 |
|
|
|
7 |
# Build:
|
8 |
# docker build . -t zir-ai:rasa
|
9 |
|
10 |
+
FROM rasa/rasa:2.7.1-full
|
11 |
|
12 |
USER root
|
13 |
|
actions/actions.py
CHANGED
@@ -18,11 +18,11 @@ class ActionDefaultFallback(Action):
|
|
18 |
"""Executes the fallback action and goes back to the previous state
|
19 |
of the dialogue"""
|
20 |
|
21 |
-
customer_id = "
|
22 |
-
corpus_id =
|
23 |
header = {
|
24 |
"customer-id": customer_id,
|
25 |
-
"x-api-key": "
|
26 |
}
|
27 |
con = None
|
28 |
|
@@ -67,8 +67,9 @@ class ActionDefaultFallback(Action):
|
|
67 |
print(last_resp["score"])
|
68 |
print(first_resp["score"])
|
69 |
if last_resp["score"] < 0.3 or first_resp["score"] < 0.3:
|
|
|
70 |
textQuery.append(
|
71 |
-
"I'm sorry, I don't have any information about that.")
|
72 |
else:
|
73 |
textQuery = print_responses(parsed["responseSet"][0], self.cur)
|
74 |
textQuery.insert(0, "\n")
|
@@ -99,7 +100,7 @@ def print_responses(response_set, sqlite_cursor):
|
|
99 |
t = result["text"]
|
100 |
text_list.append(f"{highlight(fulltext, t)}")
|
101 |
text_list.append(
|
102 |
-
"*" + f" > \"
|
103 |
text_list.append("\n")
|
104 |
break
|
105 |
return text_list
|
|
|
18 |
"""Executes the fallback action and goes back to the previous state
|
19 |
of the dialogue"""
|
20 |
|
21 |
+
customer_id = "1835841754"
|
22 |
+
corpus_id = 8
|
23 |
header = {
|
24 |
"customer-id": customer_id,
|
25 |
+
"x-api-key": "zqt_bWy42jRbsk1Quy9kWZ7grHv_lyxwNBWEklJKRA"
|
26 |
}
|
27 |
con = None
|
28 |
|
|
|
67 |
print(last_resp["score"])
|
68 |
print(first_resp["score"])
|
69 |
if last_resp["score"] < 0.3 or first_resp["score"] < 0.3:
|
70 |
+
print(f"Scores; {last_resp['score']} and {first_resp['score']}")
|
71 |
textQuery.append(
|
72 |
+
f"Scores; {last_resp['score']} and {first_resp['score']} I'm sorry, I don't have any information about that.")
|
73 |
else:
|
74 |
textQuery = print_responses(parsed["responseSet"][0], self.cur)
|
75 |
textQuery.insert(0, "\n")
|
|
|
100 |
t = result["text"]
|
101 |
text_list.append(f"{highlight(fulltext, t)}")
|
102 |
text_list.append(
|
103 |
+
"*" + f" > \"Atlantis, Dubai\" reviewed on {date}" + " *")
|
104 |
text_list.append("\n")
|
105 |
break
|
106 |
return text_list
|
config.yml
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
language: en
|
4 |
|
5 |
pipeline:
|
6 |
-
- name:
|
7 |
-
|
8 |
-
|
9 |
-
- name:
|
10 |
-
|
11 |
- name: RegexFeaturizer
|
12 |
- name: LexicalSyntacticFeaturizer
|
13 |
- name: CountVectorsFeaturizer
|
@@ -31,8 +31,9 @@ policies:
|
|
31 |
# # If you'd like to customize them, uncomment and adjust the policies.
|
32 |
# # See https://rasa.com/docs/rasa/policies for more information.
|
33 |
- name: MemoizationPolicy
|
|
|
34 |
- name: RulePolicy
|
35 |
- name: TEDPolicy
|
36 |
max_history: 1
|
37 |
-
epochs:
|
38 |
constrain_similarities: true
|
|
|
3 |
language: en
|
4 |
|
5 |
pipeline:
|
6 |
+
- name: HFTransformersNLP
|
7 |
+
model_name: "bert"
|
8 |
+
- name: LanguageModelTokenizer
|
9 |
+
- name: LanguageModelFeaturizer
|
10 |
+
model_name: "bert"
|
11 |
- name: RegexFeaturizer
|
12 |
- name: LexicalSyntacticFeaturizer
|
13 |
- name: CountVectorsFeaturizer
|
|
|
31 |
# # If you'd like to customize them, uncomment and adjust the policies.
|
32 |
# # See https://rasa.com/docs/rasa/policies for more information.
|
33 |
- name: MemoizationPolicy
|
34 |
+
max_history: 1
|
35 |
- name: RulePolicy
|
36 |
- name: TEDPolicy
|
37 |
max_history: 1
|
38 |
+
epochs: 200
|
39 |
constrain_similarities: true
|
data/nlu.yml
CHANGED
@@ -92,62 +92,107 @@ nlu:
|
|
92 |
examples: |
|
93 |
- Can we use the resort facilities if we arrive before check-in?
|
94 |
- Use fascilities without checking in?
|
|
|
|
|
|
|
95 |
- intent: booking_6
|
96 |
examples: |
|
97 |
- What's included in your Half Board Package?
|
98 |
-
- Fascilities in
|
|
|
|
|
|
|
|
|
99 |
- intent: booking_7
|
100 |
examples: |
|
101 |
- Do you offer All Inclusive Packages?
|
102 |
- Any package with everything?
|
|
|
|
|
|
|
103 |
- intent: rooms_1
|
104 |
examples: |
|
105 |
- Can you smoke in the rooms at Atlantis Dubai?
|
106 |
- Smoking rules in room?
|
|
|
|
|
|
|
107 |
- intent: rooms_2
|
108 |
examples: |
|
109 |
- Does Atlantis Dubai cater for people with disabilities?
|
110 |
- People with disabilities?
|
|
|
|
|
|
|
111 |
- intent: rooms_3
|
112 |
examples: |
|
113 |
- Are there tea and coffee making facilities in the room?
|
114 |
-
-
|
|
|
|
|
|
|
115 |
- intent: rooms_4
|
116 |
examples: |
|
117 |
- Do you provide an iron and board in the rooms?
|
118 |
- Can we use irons in rooms?
|
|
|
|
|
|
|
119 |
- intent: rooms_5
|
120 |
examples: |
|
121 |
- Do you provide refrigerators in the room?
|
122 |
- Fridge in rooms?
|
|
|
|
|
|
|
123 |
- intent: rooms_6
|
124 |
examples: |
|
125 |
- Do you provide microwaves in the room?
|
126 |
- microwaves in rooms?
|
|
|
|
|
|
|
127 |
- intent: rooms_7
|
128 |
examples: |
|
129 |
- Are roll-away/sofa beds available?
|
130 |
- Sofa cum bed in rooms?
|
|
|
|
|
|
|
131 |
- intent: rooms_8
|
132 |
examples: |
|
133 |
- Do you have international adaptors?
|
134 |
- Power outlets in rooms?
|
|
|
|
|
|
|
135 |
- intent: rooms_9
|
136 |
examples: |
|
137 |
- Do you have phone chargers?
|
138 |
- Do you provide charges for phones?
|
|
|
|
|
|
|
139 |
- intent: rooms_10
|
140 |
examples: |
|
141 |
- If I book an Imperial Club Room, what's included?
|
142 |
- Whats included in the imperial club rooms?
|
|
|
|
|
|
|
143 |
- intent: visit_1
|
144 |
examples: |
|
145 |
- Do you allow pets in Atlantis Dubai?
|
146 |
- Pets are allowed?
|
|
|
|
|
|
|
147 |
- intent: visit_2
|
148 |
examples: |
|
149 |
- Is there free WiFi at Atlantis Dubai?
|
150 |
- Free wifi?
|
|
|
|
|
151 |
- intent: visit_3
|
152 |
examples: |
|
153 |
- What’s the weather in Dubai like?
|
|
|
92 |
examples: |
|
93 |
- Can we use the resort facilities if we arrive before check-in?
|
94 |
- Use fascilities without checking in?
|
95 |
+
- Before checking in can we use the fascilities?
|
96 |
+
- Can guests use the resort fascilities?
|
97 |
+
- Can the resort fascilities be used before check-in?
|
98 |
- intent: booking_6
|
99 |
examples: |
|
100 |
- What's included in your Half Board Package?
|
101 |
+
- Fascilities in Half Board package?
|
102 |
+
- What does the Half Board package include?
|
103 |
+
- What does the Half Board include?
|
104 |
+
- What are the fascilities included in the Half Board package?
|
105 |
+
- Whats the difference between Half board package and other packages?
|
106 |
- intent: booking_7
|
107 |
examples: |
|
108 |
- Do you offer All Inclusive Packages?
|
109 |
- Any package with everything?
|
110 |
+
- Is there a package with everything included?
|
111 |
+
- Do you offer a package with everything included?
|
112 |
+
- Is there an all inclusive package?
|
113 |
- intent: rooms_1
|
114 |
examples: |
|
115 |
- Can you smoke in the rooms at Atlantis Dubai?
|
116 |
- Smoking rules in room?
|
117 |
+
- Can we smoke inside the room?
|
118 |
+
- Is smoking allowed in the rooms?
|
119 |
+
- Do you allow smoking inside the horel rooms?
|
120 |
- intent: rooms_2
|
121 |
examples: |
|
122 |
- Does Atlantis Dubai cater for people with disabilities?
|
123 |
- People with disabilities?
|
124 |
+
- For the disabled, do you provide wheelchairs?
|
125 |
+
- Is there special consideration for the disabled?
|
126 |
+
- How do you fasciliate the disabled?
|
127 |
- intent: rooms_3
|
128 |
examples: |
|
129 |
- Are there tea and coffee making facilities in the room?
|
130 |
+
- Is there a kettle in the room?
|
131 |
+
- Do you provide tea or coffee related fascilities inside the room?
|
132 |
+
- Do rooms have tean and coffee fascilities?
|
133 |
+
- Do you provide coffee maker inside the room?
|
134 |
- intent: rooms_4
|
135 |
examples: |
|
136 |
- Do you provide an iron and board in the rooms?
|
137 |
- Can we use irons in rooms?
|
138 |
+
- Can we iron our clothes in the room?
|
139 |
+
- Instead of sending clothes, can we iron them inside the room?
|
140 |
+
- Can we call in an iron and board from the room services?
|
141 |
- intent: rooms_5
|
142 |
examples: |
|
143 |
- Do you provide refrigerators in the room?
|
144 |
- Fridge in rooms?
|
145 |
+
- is there a fridge in the room?
|
146 |
+
- Do you provide fridge in rooms on requests or is it there by default?
|
147 |
+
- Do the rooms have fridge?
|
148 |
- intent: rooms_6
|
149 |
examples: |
|
150 |
- Do you provide microwaves in the room?
|
151 |
- microwaves in rooms?
|
152 |
+
- Is there a microwave in the rooms to heat food?
|
153 |
+
- How can we heat food in the room?
|
154 |
+
- On request, can you add in a microwave in the room?
|
155 |
- intent: rooms_7
|
156 |
examples: |
|
157 |
- Are roll-away/sofa beds available?
|
158 |
- Sofa cum bed in rooms?
|
159 |
+
- can we add an extra roll-away/sofa beds in the room?
|
160 |
+
- Do you provide a sofa cum bed in the room?
|
161 |
+
- Do you provide a roll away sofa in the room?
|
162 |
- intent: rooms_8
|
163 |
examples: |
|
164 |
- Do you have international adaptors?
|
165 |
- Power outlets in rooms?
|
166 |
+
- Do the rooms have a 110V outlet or the 220V?
|
167 |
+
- Do you provide international adaptors?
|
168 |
+
- Do you provide american charging outlets or Europian?
|
169 |
- intent: rooms_9
|
170 |
examples: |
|
171 |
- Do you have phone chargers?
|
172 |
- Do you provide charges for phones?
|
173 |
+
- Do you provide phone charges in the rooms?
|
174 |
+
- Do you provide phone charges in the room free of cost?
|
175 |
+
- Can i call in a phone charge from the room service?
|
176 |
- intent: rooms_10
|
177 |
examples: |
|
178 |
- If I book an Imperial Club Room, what's included?
|
179 |
- Whats included in the imperial club rooms?
|
180 |
+
- What's included if i book the Imperial Club Room?
|
181 |
+
- What do you provide extra if i book the Imperail Club Room?
|
182 |
+
- I want to boo the Imperial Club Room, what is included in the package?
|
183 |
- intent: visit_1
|
184 |
examples: |
|
185 |
- Do you allow pets in Atlantis Dubai?
|
186 |
- Pets are allowed?
|
187 |
+
- Can i bring my dog to the hotel?
|
188 |
+
- Are cats allowed in the hotel?
|
189 |
+
- Is there a no pets policy in Atlantis Dubai?
|
190 |
- intent: visit_2
|
191 |
examples: |
|
192 |
- Is there free WiFi at Atlantis Dubai?
|
193 |
- Free wifi?
|
194 |
+
- Do you provide free internet services in the hotel?
|
195 |
+
-
|
196 |
- intent: visit_3
|
197 |
examples: |
|
198 |
- What’s the weather in Dubai like?
|
domain.yml
CHANGED
@@ -250,9 +250,9 @@ responses:
|
|
250 |
utter_restaurant_5:
|
251 |
- text: "The Half Board Package includes breakfast and dinner daily (excluding brunches and Aquaventure restaurants). Guests have a choice of a starter, main course and dessert from the a la carte menu, with the exception of signature dishes in the following restaurants. Restaurants and supplementary charges are subject to change without notice. "
|
252 |
utter_restaurant_6:
|
253 |
-
- text: "
|
254 |
utter_restaurant_7:
|
255 |
-
- text: "
|
256 |
utter_restaurant_8:
|
257 |
- text: "For your comfort, please note the following dress codes for restaurants at Atlantis Dubai. Hakkasan, Seafire, Bread Street Kitchen and Ayamna Smart Casual dress code, with a minimum of tailored shorts, shirts with sleeves, closed shoes or sandals. Flip flops are not allowed. UAE national dress is welcome. Kaleidoscope, Saffron, Ronda Locatelli and Plato’s Casual dress code, with a minimum of tailored shorts, shirt with sleeves and any footwear is allowed. UAE national dress is welcome. The Edge and The Shore Casual dress code, with a minimum of shorts, shirts and any footwear allowed. UAE national dress is welcome. No swimwear or towels allowed in the evening. Food outlets in The Avenues Casual dress code, with a minimum of shorts, shirts and any footwear allowed. UAE national dress is welcome. No swimwear or towels allowed. Nobu Smart casual dress code is recommended. Gentlemen are requested to wear long trousers or smart jeans. Minimum of shirts with sleeves, closed shoes or sandals. Flip flops are not allowed. UAE national dress is welcome. Ossiano Smart Elegant dress code is recommended. Gentlemen are requested to wear shirts with a collar, long trousers or smart jeans and closed shoes (no trainers). UAE national dress is welcome. The same dress code applies to eligible children dining in the restaurant."
|
258 |
utter_restaurant_9:
|
|
|
250 |
utter_restaurant_5:
|
251 |
- text: "The Half Board Package includes breakfast and dinner daily (excluding brunches and Aquaventure restaurants). Guests have a choice of a starter, main course and dessert from the a la carte menu, with the exception of signature dishes in the following restaurants. Restaurants and supplementary charges are subject to change without notice. "
|
252 |
utter_restaurant_6:
|
253 |
+
- text: "Smoking is not permitted inside the restaurants at Atlantis Dubai, however, guests are allowed to smoke at the bar at Wavehouse and in the designated areas on the restaurant terraces."
|
254 |
utter_restaurant_7:
|
255 |
+
- text: "The indoor dining areas of all restaurants at Atlantis Dubai are smoke-free zones."
|
256 |
utter_restaurant_8:
|
257 |
- text: "For your comfort, please note the following dress codes for restaurants at Atlantis Dubai. Hakkasan, Seafire, Bread Street Kitchen and Ayamna Smart Casual dress code, with a minimum of tailored shorts, shirts with sleeves, closed shoes or sandals. Flip flops are not allowed. UAE national dress is welcome. Kaleidoscope, Saffron, Ronda Locatelli and Plato’s Casual dress code, with a minimum of tailored shorts, shirt with sleeves and any footwear is allowed. UAE national dress is welcome. The Edge and The Shore Casual dress code, with a minimum of shorts, shirts and any footwear allowed. UAE national dress is welcome. No swimwear or towels allowed in the evening. Food outlets in The Avenues Casual dress code, with a minimum of shorts, shirts and any footwear allowed. UAE national dress is welcome. No swimwear or towels allowed. Nobu Smart casual dress code is recommended. Gentlemen are requested to wear long trousers or smart jeans. Minimum of shirts with sleeves, closed shoes or sandals. Flip flops are not allowed. UAE national dress is welcome. Ossiano Smart Elegant dress code is recommended. Gentlemen are requested to wear shirts with a collar, long trousers or smart jeans and closed shoes (no trainers). UAE national dress is welcome. The same dress code applies to eligible children dining in the restaurant."
|
258 |
utter_restaurant_9:
|
reviews.db
CHANGED
Binary files a/reviews.db and b/reviews.db differ
|
|