Add fuzzy and text-classification light model #1

Merged
Tjiho merged 18 commits from fuzzy into master 2025-02-01 01:35:11 +01:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 7a756137dc - Show all commits

View file

@ -79,6 +79,7 @@ def run_prompt():
question = "empty"
while question != "stop":
question = input("?")
if question != "stop":
print(answer(question))

View file

@ -60,7 +60,7 @@ class BertIntent():
classification = self.classifier(sentence)
if classification[0]["score"] < 0.7: # score too low
return
return {'intentName': ''}
label = classification[0]["label"]
@ -69,7 +69,7 @@ class BertIntent():
elif label == "DATE":
return {'intentName': 'GetDate'}
elif label == "ETEINDRE_CUISINE":
return {'intentName': 'GetTime', 'intentArg': ['cuisine']}
return {'intentName': 'LightOff', 'intentArg': ['cuisine']}
elif label == "ETEINDRE_BUREAU":
return {'intentName': 'LightOff', 'intentArg': ['bureau']}
elif label == "ETEINDRE_SALON":