Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Исключение на однословном вопросе #24

Open
iamwavecut opened this issue May 3, 2020 · 1 comment
Open

Comments

@iamwavecut
Copy link

0.0.2.9-alpha

Answering machine is running on Linux-4.19.76-linuxkit-x86_64-with-debian-10.3 py=3.6

B:> Привет
H:> тест?
2020-05-03 21:05:23 INFO     SimpleAnsweringMachine  - push_phrase interlocutor="test" phrase="тест?"
2020-05-03 21:05:23 DEBUG    SimpleAnsweringMachine  - intent="прочее"
/usr/local/lib/python3.6/site-packages/lightgbm/basic.py:546: UserWarning: Converting data to scipy sparse matrix.
  warnings.warn('Converting data to scipy sparse matrix.')
2020-05-03 21:05:23 DEBUG    SimpleAnsweringMachine  - Processing as question: "тест ?"
2020-05-03 21:05:24 DEBUG    root  - Text matched in rule: input_text="привет", best_etalon="привет", best_sim=0.971447
2020-05-03 21:05:25 DEBUG    root  - Text matched in rule: input_text="тест ?", best_etalon="тест тест", best_sim=0.992137
2020-05-03 21:05:25 DEBUG    root  - ScriptingRuleIf "rule_builder[болтовня_979]"
2020-05-03 21:05:25 INFO     SimpleAnsweringMachine  - say "люблю тесты"

B:> люблю тесты
H:> тест?
2020-05-03 21:05:30 INFO     SimpleAnsweringMachine  - push_phrase interlocutor="test" phrase="тест?"
Traceback (most recent call last):
  File "../ruchatbot/frontend/console_chatbot.py", line 160, in <module>
    main()
  File "../ruchatbot/frontend/console_chatbot.py", line 156, in main
    bot.push_phrase(user_id, question)
  File "/chatbot/ruchatbot/bot/bot_personality.py", line 63, in push_phrase
    force_question_answering=self.force_question_answering)
  File "/chatbot/ruchatbot/bot/simple_answering_machine.py", line 849, in push_phrase
    interpreted_phrase = self.interpret_phrase(bot, session, question, internal_issuer)
  File "/chatbot/ruchatbot/bot/simple_answering_machine.py", line 273, in interpret_phrase
    phrase = self.interpreter.interpret(context_phrases, self.text_utils, self.replica_grammar)
  File "/chatbot/ruchatbot/bot/nn_interpreter_new2.py", line 136, in interpret
    assert(len(phrases) == 2)
AssertionError

Как видно валится на попытке задать односложный вопрос на втором шаге, внизу свалившийся ассерт.

@Koziev
Copy link
Owner

Koziev commented May 5, 2020

Добрый день,
огромное спасибо за подробности, буду разбираться.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants