Y
Y
yahabrovec2018-07-31 09:31:11
Python
yahabrovec, 2018-07-31 09:31:11

Looking for hot words in a sentence?

Hello everyone who reads this.
I am writing my bot in python, and now I am faced with a new problem. He can only respond to commands like: write a movie, he will show the schedule in the cinema. But if I write show the schedule in the cinema, he will not understand me. I want to do a hot word search. For example, if the input sentence contains the word cinema , it will show the schedule. If there is a word currency it will show the exchange rate. Tell me how to do it?
PS I myself tried using conditional expressions, but this does not suit me, since the bot will still not understand synonyms. And this is just what I need.
PPS You don't need to write ready-made code, just tell me which library can help me.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
B
be52, 2018-08-01
@be52

Maybe it's worth throwing out all the commands available to the user in the form of buttons? so that he does not have to write, and even without errors so that the bot understands

D
Danil, 2018-07-31
@DanilBaibak

spacy

D
Dmitry, 2018-07-31
@dmtrrr

You need to look towards NLP and understanding user intent.

V
Vladimir, 2018-07-31
@vintello

python + nltk unexpectedly gives very good results
first article in search is quite interesting, then google it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question