diff --git a/chatbot/nlp/query.py b/chatbot/nlp/query.py index 33a23fb..238b3f8 100644 --- a/chatbot/nlp/query.py +++ b/chatbot/nlp/query.py @@ -222,7 +222,7 @@ def _perform_search(query_text, url_style): # Append answers until we reach the CHAR_LIMIT i, n_chars = 0, 0 while n_chars < CHAR_LIMIT and i < len(answers): - n_chars += len(answers[i]) + n_chars += len(answers[i][0]) i += 1 # If we only have 1 answer after threshold we don't want to add the diff --git a/chatbot/settings.json b/chatbot/settings.json index c036f9d..7a15055 100644 --- a/chatbot/settings.json +++ b/chatbot/settings.json @@ -94,9 +94,9 @@ "multiple_answers": "Jeg har flere mulige svar til deg.", "url_from_text": "Kilde", "custom_synset_file": "chatbot/nlp/statics/synset.json", - "character_limit": 400, - "max_answers": 4, - "answer_threshold": 0.05, + "character_limit": 300, + "max_answers": 3, + "answer_threshold": 0.065, "similarity_threshold": 0.1 } } diff --git a/setup.py b/setup.py index 96bc2d9..3b84b77 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -setup(name='chatbot', version='1.5.0', packages=['chatbot/nlp', +setup(name='chatbot', version='1.5.1', packages=['chatbot/nlp', 'chatbot/model', 'chatbot/api', 'chatbot/util',