diff --git a/example/actions.py b/example/actions.py index 766248102098772f090eb84a66fd3935327c4060..d4c7c76be7bb1921cb2e147de35fa5792dd1bac4 100644 --- a/example/actions.py +++ b/example/actions.py @@ -1,6 +1,9 @@ from rasa_core_sdk import Action from rasa_core_sdk.events import SlotSet +# +# Birthplace +# class ActionSearchBirthplace(Action): def name(self): return 'action_search_birthplace' @@ -8,11 +11,10 @@ class ActionSearchBirthplace(Action): def run(self, dispatcher, tracker, domain): import csv import re - #dispatcher.utter_message("Searching for Birthplace") person = tracker.get_slot('physicist') name_regex = re.compile(person, re.IGNORECASE) actual_birthplace = None - with open('birthplace.tsv') as csvfile: + with open('data.tsv') as csvfile: spamreader = csv.DictReader(csvfile, delimiter='\t') for row in spamreader: if name_regex.match(row['name']): @@ -34,3 +36,291 @@ class ActionUtterBirthplace(Action): else: dispatcher.utter_message("The birthplace of " + person + " is " + birthplace + ".") return [] + +# +# Day of death +# +class ActionSearchDayOfDeath(Action): + def name(self): + return 'action_search_birthplace' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_day_of_death = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_day_of_death = row['day_of_death'] + if actual_day_of_death is None: + return[SlotSet('day_of_death', [])] + return [SlotSet('day_of_death', actual_day_of_death if actual_day_of_death is not None else [])] + + +class ActionUtterDayOfDeath(Action): + def name(self): + return 'action_utter_day_of_death' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + day_of_death = tracker.get_slot('day_of_death') + if day_of_death == None: + dispatcher.utter_message("Error: day of death of " + person + "not known.") + else: + dispatcher.utter_message("The day of death of " + person + " is " + day_of_death + ".") + return [] + +# +# Place of death +# +class ActionSearchPlaceOfDeath(Action): + def name(self): + return 'action_search_place_of_death' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_place_of_death = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_place_of_death = row['place_of_death'] + if actual_place_of_death is None: + return[SlotSet('place_of_death', [])] + return [SlotSet('place_of_death', actual_place_of_death if actual_place_of_death is not None else [])] + + +class ActionUtterPlaceOfDeath(Action): + def name(self): + return 'action_utter_place_of_death' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + place_of_death = tracker.get_slot('place_of_death') + if place_of_death == None: + dispatcher.utter_message("Error: Place of death of " + person + "not known.") + else: + dispatcher.utter_message("The place of death of " + person + " is " + place_of_death + ".") + return [] + +# +# Is alive +# +class ActionSearchIsAlive(Action): + def name(self): + return 'action_search_is_alive' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_is_alive = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_is_alive = row['is_alive'] + if actual_is_alive is None: + return[SlotSet('is_alive', [])] + return [SlotSet('is_alive', actual_is_alive if actual_is_alive is not None else [])] + + +class ActionUtterPlaceOfDeath(Action): + def name(self): + return 'action_utter_is_alive' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + is_alive = tracker.get_slot('is_alive') + if is_alive == None: + dispatcher.utter_message("Error: Life status of " + person + "not known.") + else: + dispatcher.utter_message("The Life status of " + person + " is " + is_alive + ".") + return [] + +# +# num spouses +# +class ActionSearchNumSpouses(Action): + def name(self): + return 'action_search_num_spouses' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_num_spouses = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_num_spouses = row['num_spouses'] + if actual_num_spouses is None: + return[SlotSet('num_spouses', [])] + return [SlotSet('num_spouses', actual_num_spouses if actual_num_spouses is not None else [])] + + +class ActionUtterNumSpouses(Action): + def name(self): + return 'action_utter_num_spouses' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + num_spouses = tracker.get_slot('num_spouses') + if num_spouses == None: + dispatcher.utter_message("Error: Number of Spouses of " + person + "not known.") + else: + dispatcher.utter_message("The Number of spouses of " + person + " is " + num_spouses + ".") + return [] + +# +# Primary Education +# +class ActionSearchPrimaryEducation(Action): + def name(self): + return 'action_search_primary_education' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_primary_education = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_primary_education = row['primary_education'] + if actual_primary_education is None: + return[SlotSet('primary_education', [])] + return [SlotSet('primary_education', actual_primary_education if actual_primary_education is not None else [])] + + +class ActionUtterPrimaryEducation(Action): + def name(self): + return 'action_utter_primary_education' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + primary_education = tracker.get_slot('primary_education') + if primary_education == None: + dispatcher.utter_message("Error: Primary education of " + person + "not known.") + else: + dispatcher.utter_message("The primary education of " + person + " is " + primary_education + ".") + return [] + +# +# University +# +class ActionSearchUniversity(Action): + def name(self): + return 'action_search_university' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_university = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_university = row['university'] + if actual_university is None: + return[SlotSet('university', [])] + return [SlotSet('university', actual_university if actual_universtiy is not None else [])] + + +class ActionUtterAreaOfResearch(Action): + def name(self): + return 'action_utter_area_of_research' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + area_of_research = tracker.get_slot('area_of_research') + if area_of_research == None: + dispatcher.utter_message("Error: Area of Research of " + person + "not known.") + else: + dispatcher.utter_message("The Area of research of " + person + " is " + area_of_research + ".") + return [] + +# +# Workplace +# +class ActionSearchWorkplace(Action): + def name(self): + return 'action_search_workplace' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_workplace = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_workplace = row['workplace'] + if actual_workplace is None: + return[SlotSet('workplace', [])] + return [SlotSet('workplace', actual_workplace if actual_workplace is not None else [])] + + +class ActionUtterWorkplace(Action): + def name(self): + return 'action_utter_workplace' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + workplace = tracker.get_slot('workplace') + if workplace == None: + dispatcher.utter_message("Error: Workplace of " + person + "not known.") + else: + dispatcher.utter_message("The Workplace of " + person + " is " + workplace + ".") + return [] + +# +# Awards +# +class ActionSearchAwards(Action): + def name(self): + return 'action_search_awards' + + def run(self, dispatcher, tracker, domain): + import csv + import re + person = tracker.get_slot('physicist') + name_regex = re.compile(person, re.IGNORECASE) + actual_awards = None + with open('data.tsv') as csvfile: + spamreader = csv.DictReader(csvfile, delimiter='\t') + for row in spamreader: + if name_regex.match(row['name']): + actual_awards = row['awards'] + if actual_awards is None: + return[SlotSet('awards', [])] + return [SlotSet('awards', actual_awards if actual_awards is not None else [])] + + +class ActionUtterAwards(Action): + def name(self): + return 'action_utter_awards' + + def run(self, dispatcher, tracker, domain): + person = tracker.get_slot('physicist') + awards = tracker.get_slot('awards') + if awards == None: + dispatcher.utter_message("Error: Awards of " + person + "not known.") + else: + dispatcher.utter_message("The Awards of " + person + " is " + awards + ".") + return [] diff --git a/example/birthplace.tsv b/example/data.tsv similarity index 100% rename from example/birthplace.tsv rename to example/data.tsv diff --git a/example/domain.yml b/example/domain.yml index 716b1fa5522da68b7bc5956e5725c6a6435485bf..7e53b91269351d832b10bf0cb4c822ae41ed9856 100644 --- a/example/domain.yml +++ b/example/domain.yml @@ -14,7 +14,6 @@ intents: actions: - utter_greet - - utter_birthplace - utter_goodbye - action_search_birthplace - action_utter_birthplace @@ -46,23 +45,23 @@ slots: birthplace: type: unfeaturized day_of_death: - type: undefined + type: unfeaturized place_of_death: - type: undefined + type: unfeaturized is_alive: - type: undefined + type: unfeaturized num_spouses: - type: undefined + type: unfeaturized primary_education: - type: undefined + type: unfeaturized university: - type: undefined + type: unfeaturized area_of_research: - type: undefined + type: unfeaturized workplace: - type: undefined + type: unfeaturized awards: - type: undefined + type: unfeaturized templates: utter_greet: diff --git a/example/models/dialogue/domain.json b/example/models/dialogue/domain.json index 6cea1e08304223ed8b93972d447cabad0f4c8f21..f43c311830bf901bd075c82253ec17b8faddb534 100644 --- a/example/models/dialogue/domain.json +++ b/example/models/dialogue/domain.json @@ -1,8 +1,17 @@ { "states": [ + "intent_area_of_research", + "intent_awards", "intent_birthplace", + "intent_day_of_death", "intent_goodbye", "intent_greet", + "intent_is_alive", + "intent_num_spouses", + "intent_place_of_death", + "intent_primary_education", + "intent_university", + "intent_workplace", "entity_physicist", "slot_physicist_0", "prev_action_listen", @@ -10,9 +19,26 @@ "prev_action_default_fallback", "prev_action_deactivate_form", "prev_utter_greet", - "prev_utter_birthplace", "prev_utter_goodbye", "prev_action_search_birthplace", - "prev_action_utter_birthplace" + "prev_action_utter_birthplace", + "prev_action_search_day_of_death", + "prev_action_utter_day_of_death", + "prev_action_search_place_of_death", + "prev_action_utter_place_of_death", + "prev_action_search_is_alive", + "prev_action_utter_is_alive", + "prev_action_search_num_spouses", + "prev_action_utter_num_spouses", + "prev_action_search_primary_education", + "prev_action_utter_primary_education", + "prev_action_search_university", + "prev_action_utter_university", + "prev_action_search_area_of_research", + "prev_action_utter_area_of_research", + "prev_action_search_workplace", + "prev_action_utter_workplace", + "prev_action_search_awards", + "prev_action_utter_awards" ] } \ No newline at end of file diff --git a/example/models/dialogue/domain.yml b/example/models/dialogue/domain.yml index d53622c964527d54f5c6e81ddb4998ff25007831..ef93e883948ab57314e8471c0e51544f60573616 100644 --- a/example/models/dialogue/domain.yml +++ b/example/models/dialogue/domain.yml @@ -2,10 +2,27 @@ --- actions: - utter_greet -- utter_birthplace - utter_goodbye - action_search_birthplace - action_utter_birthplace +- action_search_day_of_death +- action_utter_day_of_death +- action_search_place_of_death +- action_utter_place_of_death +- action_search_is_alive +- action_utter_is_alive +- action_search_num_spouses +- action_utter_num_spouses +- action_search_primary_education +- action_utter_primary_education +- action_search_university +- action_utter_university +- action_search_area_of_research +- action_utter_area_of_research +- action_search_workplace +- action_utter_workplace +- action_search_awards +- action_utter_awards config: store_entities_as_slots: true entities: @@ -18,15 +35,69 @@ intents: use_entities: true - birthplace: use_entities: true +- day_of_death: + use_entities: true +- place_of_death: + use_entities: true +- is_alive: + use_entities: true +- num_spouses: + use_entities: true +- primary_education: + use_entities: true +- university: + use_entities: true +- area_of_research: + use_entities: true +- workplace: + use_entities: true +- awards: + use_entities: true slots: + area_of_research: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot + awards: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot birthplace: auto_fill: true initial_value: null type: rasa_core.slots.UnfeaturizedSlot + day_of_death: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot + is_alive: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot + num_spouses: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot physicist: auto_fill: true initial_value: null type: rasa_core.slots.TextSlot + place_of_death: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot + primary_education: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot + university: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot + workplace: + auto_fill: true + initial_value: null + type: rasa_core.slots.UnfeaturizedSlot templates: utter_goodbye: - text: Bye diff --git a/example/models/dialogue/policy_0_MemoizationPolicy/memorized_turns.json b/example/models/dialogue/policy_0_MemoizationPolicy/memorized_turns.json index cfca8917538b27de29e196eb0ff55d46b22100f1..4f192d74183922730b9bae40dac5d1f47961f1ec 100644 --- a/example/models/dialogue/policy_0_MemoizationPolicy/memorized_turns.json +++ b/example/models/dialogue/policy_0_MemoizationPolicy/memorized_turns.json @@ -2,42 +2,42 @@ "max_history": 3, "lookup": { "eJyLzivNydFRgJDVtbEAMW4Fvw==": 0, - "eJyLzivNydFRqK4F4tS8ksySyviCjMrizOTM4hIrBUM9Ax2FzLwSoEx8UmZRSUZBTmJyanxicklmfh5UuqAotQwqEp8D1JUKkyjOyS9BGBZvABaujQUARD0oZA==": 7, - "eJyLrq7VUahOzSvJLKmML8ioLM5MziwusVIw1DPQUcjMKwHKxCdlFpVkFOQkJqfGJyaXZObnQaULilLLoCLxOUBdqTCJ4pz8EoRh8QZgYerYU5yaWJScgaQUr5WxABJHT20=": 8, + "eJyLzivNydFRqK4F4tS8ksySyviCjMrizOTM4hIrBUM9Ax2FzLwSoEx8UmZRSUZBTmJyanxicklmfh5UuqAotQwqEp8D1JUKkyjOyS9BGBZvABaujQUARD0oZA==": 6, + "eJyLrq7VUahOzSvJLKmML8ioLM5MziwusVIw1DPQUcjMKwHKxCdlFpVkFOQkJqfGJyaXZObnQaULilLLoCLxOUBdqTCJ4pz8EoRh8QZgYerYU5yaWJScgaQUr5WxABJHT20=": 7, "eJyLrk7NK8ksqYwvyKgszkzOLC6xUjDUM9BRyMwrAcrEJ2UWlWQU5CQmp8YnJpdk5udBpQuKUsugIvE5QF2pMIninPwShGHxBmDhWh0FKthTnJpYlJyBpJT2VpaWlKQWEWtjLAAYzXb3": 0, - "eJy9jUsKgCAURbfiAiRq2lYiHiYPfCAmegsk2nsRQo0aRdNzP2fYOEBQKLqSxUpGr7qm1UoCzoQmSXDRG8tkLGQONY6J10oos0nWPaq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EuzskviS/IqCzOTM4sLok3AAvX6ijAjcjPT0mqTEU2JDG5JDM/Lz4HqD41j3xjoG5BkcBuTCwAAj1IhA==": 0, - "eJyLrs7MK0nNK4lPz89PSapMtVIw1DPQUSgoSi2LT0wuyczPi8/JLAaqgEoU5+SXxBdkVBZnJgOF4w3AwrU6CniMKS0pSS1CkyDDGOJdEwsAUzpKGA==": 6, - "eJyLrs7MK0nNK4lPz89PSapMtVIw1DPQUSgoSi2LLy0pSS1CkyjOyS+JL8ioLM5MziwuiTcAC9fqKOAxJjG5JDM/Lz4HqD41j3xjiHdNLABa6koo": 0, - "eJyLrs7MK0nNK4lPz89PSapMtVIw1DPQUSgoSi2LT0wuyczPi8/JLAaqgEoU5+SXxBdkVBZnJgOF4w3AwrU6CniMKS0pSS1Ck8BpDNCMzJJKhBRUPdT0pMyikoyCnMTkVKjjyHNuLADh2VY7": 7, - "eJyLrs7MK0nNK4lPz89PSapMtVIw1DPQUSgoSi2LLy0pSS1CkyjOyS+JL8ioLM5MziwuiTcAC9fqKFQDzcgsqURIQdVDTU/KLCrJKMhJTE6NT0wuyczPQ7YHIhKfA9SVmkd7e4pTE4uSM5CU4rUyFgCoaWbC": 8 + "eJyLrs7MK0nNK4lPL0pNLbFSMNQz0FEoKEoti09MLsnMz4vPySwGykMlinPyS+ILMiqLM5OBwvEGYOFaHQWchpSWlKQWoQjjNAKoP7OkEiEFVQ81OSmzqCSjICcxORXqMPKcGgsAnvJTxQ==": 6, + "eJy1jUsKhDAQBa+SA4jodq4i0sTQmIYQQ+c5IOLdFRXUjTu39T7VzBLBEdQrM36mLqvCJOU/jQDrA+cwgJKfsjjJoGrHS2HmbS+Yrujsn8+dKHwK1jFZBxni3XIQCtuK4/eezFadv1Vfle0K0VllHg==": 7 } } \ No newline at end of file diff --git a/example/models/dialogue/policy_1_PhysicistPolicy/featurizer.json b/example/models/dialogue/policy_1_PhysicistPolicy/featurizer.json index cb992a77f3498434366bfe1381f016a03abdfe1d..fc3bf59eae31b9addf0efae16bee4702d763266c 100644 --- a/example/models/dialogue/policy_1_PhysicistPolicy/featurizer.json +++ b/example/models/dialogue/policy_1_PhysicistPolicy/featurizer.json @@ -1 +1 @@ -{"py/object": "rasa_core.featurizers.MaxHistoryTrackerFeaturizer", "max_history": 5, "remove_duplicates": true, "state_featurizer": {"py/object": "rasa_core.featurizers.BinarySingleStateFeaturizer", "input_state_map": {"entity_physicist": 3, "intent_birthplace": 0, "intent_goodbye": 1, "intent_greet": 2, "prev_action_deactivate_form": 8, "prev_action_default_fallback": 7, "prev_action_listen": 5, "prev_action_restart": 6, "prev_action_search_birthplace": 12, "prev_action_utter_birthplace": 13, "prev_utter_birthplace": 10, "prev_utter_goodbye": 11, "prev_utter_greet": 9, "slot_physicist_0": 4}, "num_features": 14, "slot_feature_len": 1, "user_feature_len": 4}, "use_intent_probabilities": false} \ No newline at end of file +{"py/object": "rasa_core.featurizers.MaxHistoryTrackerFeaturizer", "max_history": 5, "remove_duplicates": true, "state_featurizer": {"py/object": "rasa_core.featurizers.BinarySingleStateFeaturizer", "input_state_map": {"entity_physicist": 12, "intent_area_of_research": 0, "intent_awards": 1, "intent_birthplace": 2, "intent_day_of_death": 3, "intent_goodbye": 4, "intent_greet": 5, "intent_is_alive": 6, "intent_num_spouses": 7, "intent_place_of_death": 8, "intent_primary_education": 9, "intent_university": 10, "intent_workplace": 11, "prev_action_deactivate_form": 17, "prev_action_default_fallback": 16, "prev_action_listen": 14, "prev_action_restart": 15, "prev_action_search_area_of_research": 34, "prev_action_search_awards": 38, "prev_action_search_birthplace": 20, "prev_action_search_day_of_death": 22, "prev_action_search_is_alive": 26, "prev_action_search_num_spouses": 28, "prev_action_search_place_of_death": 24, "prev_action_search_primary_education": 30, "prev_action_search_university": 32, "prev_action_search_workplace": 36, "prev_action_utter_area_of_research": 35, "prev_action_utter_awards": 39, "prev_action_utter_birthplace": 21, "prev_action_utter_day_of_death": 23, "prev_action_utter_is_alive": 27, "prev_action_utter_num_spouses": 29, "prev_action_utter_place_of_death": 25, "prev_action_utter_primary_education": 31, "prev_action_utter_university": 33, "prev_action_utter_workplace": 37, "prev_utter_goodbye": 19, "prev_utter_greet": 18, "slot_physicist_0": 13}, "num_features": 40, "slot_feature_len": 1, "user_feature_len": 13}, "use_intent_probabilities": false} \ No newline at end of file diff --git a/example/models/dialogue/policy_1_PhysicistPolicy/keras_model.h5 b/example/models/dialogue/policy_1_PhysicistPolicy/keras_model.h5 index c76822ea8e49b5887349efc6992fd476ae1d7f42..2da82cd73064a3619947e964195b1e71135819bd 100644 Binary files a/example/models/dialogue/policy_1_PhysicistPolicy/keras_model.h5 and b/example/models/dialogue/policy_1_PhysicistPolicy/keras_model.h5 differ diff --git a/example/models/dialogue/policy_metadata.json b/example/models/dialogue/policy_metadata.json index 4185cb18a4f2c273d120db4cd9569b57033747b4..ce7afcc89b16e070ef883f6eb6175c2bfcf8f142 100644 --- a/example/models/dialogue/policy_metadata.json +++ b/example/models/dialogue/policy_metadata.json @@ -8,10 +8,10 @@ "action_utter_birthplace": { "slots": [] }, - "utter_goodbye": { + "utter_greet": { "slots": [] }, - "utter_greet": { + "utter_goodbye": { "slots": [] } }, @@ -26,5 +26,5 @@ "rasa_core.policies.memoization.MemoizationPolicy", "policy.PhysicistPolicy" ], - "trained_at": "20181211-164313" + "trained_at": "20181212-133227" } \ No newline at end of file diff --git a/example/models/nlu/default/current/crf_model.pkl b/example/models/nlu/default/current/crf_model.pkl index fd78bba5182ceae725a02bc843ca8f3a09ae9637..38413addded0a13c7380bb4065ff1e17477ae83b 100644 Binary files a/example/models/nlu/default/current/crf_model.pkl and b/example/models/nlu/default/current/crf_model.pkl differ diff --git a/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.data-00000-of-00001 b/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.data-00000-of-00001 index f9c83b05b304e655dd96a27063936dcfadf9011d..09210c78b98cfca758e99b923e70f7f1aee7f04e 100644 Binary files a/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.data-00000-of-00001 and b/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.data-00000-of-00001 differ diff --git a/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.index b/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.index index f0c2ff912c9e4a5ec631b83470251d0f3cf3ab7c..8b5bfb65544cce85b1ae2cf4c7b954220f648071 100644 Binary files a/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.index and b/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.index differ diff --git a/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.meta b/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.meta index aa57c9e62222b8433e42b90dc5dac9df2c610b61..4df0e3ba00e4e8e008f5895099f65843008a4232 100644 Binary files a/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.meta and b/example/models/nlu/default/current/intent_classifier_tensorflow_embedding.ckpt.meta differ diff --git a/example/models/nlu/default/current/metadata.json b/example/models/nlu/default/current/metadata.json index 957e8007762b4ba36924fd9032d002d0004e5be3..91a59388157243000832c56b56c906723fd486db 100644 --- a/example/models/nlu/default/current/metadata.json +++ b/example/models/nlu/default/current/metadata.json @@ -91,6 +91,6 @@ } ], "training_data": "training_data.json", - "trained_at": "20181211-164323", + "trained_at": "20181212-133237", "rasa_nlu_version": "0.14.0a1" } \ No newline at end of file