Commit 1fa643af by Rajeev Uppala

duckling extraction code added

parent ad82ce6f
Showing with 10 additions and 4 deletions
......@@ -161,7 +161,9 @@ class greet_primary_information(FormAction):
print(value)
print("OUT")
try:
matchedDate = value
timeentity=tracker.events[-1]['parse_data']['entities'][0]['value']
matchedDate = datetime.strptime(timeentity, "%Y-%m-%dT%H:%M:%S.000+00:00").strftime('%Y-%m-%d %H:%M:%S')
print("matchedDate",matchedDate)
# Since both the fields are populated, the form
# will no longer prompt the user separately for the end_date
print("Validate available time try")
......@@ -187,8 +189,8 @@ class greet_primary_information(FormAction):
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
print("type of self from text",type(self.from_text()))
print("self from text",self.from_text())
# print("type of self from text",type(self.from_text()))
# print("self from text",self.from_text())
return {
"askques": [self.from_intent(intent=["affirm"],value="yes"),self.from_intent(intent=["deny"],value="no"),self.from_text()],
"email_mobile": self.from_text(),
......
......@@ -28,6 +28,7 @@ entities:
- mobilenumber
- response
- jobtype
- time
forms:
- greet_primary_information_form
......@@ -93,8 +94,11 @@ slots:
refferal_yes_info:
type: unfeaturized
time:
type: unfeaturized
templates:
utter_slots_datetime:
- custom:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment