V
V
Vitaly Stolyarov2016-05-24 21:13:49
Bots
Vitaly Stolyarov, 2016-05-24 21:13:49

How to start creating a chat bot on a specific topic?

At first, the following comes to mind: push data for answers and question templates into the database. When a question is received, use a regular expression to sort through the pattern until the first matching one and, in accordance with this pattern, give an answer, for example:

/(сколько стоит|какая стоимость|почем)\ (пылесос|утюг|ноутбук|смартфон).?\ в\ (магазине)*\ (комфи|comfy|фокстрот)/i

for simple examples it will work, but with a large number of enums it is bad. Then you can do this
/(сколько стоит|какая стоимость|почем)\ ([A-zА-я\ ]{2,})\ в\ (магазине)?\ ([A-zА-я\ ]{2,})/i

however, there remains the inconvenience of adding new templates. Manually prescribing templates for different types of questions is somehow tedious.
Recently, topics on machine learning and neural networks have often flashed, so maybe it’s worth starting with this? Tell me in which direction to dig, and if possible, a little history from your experience))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-05-24
@begemot_sun

You need to start with linguistics, statistics, Bayesian classifiers, neural networks, homonyms and text corpora.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question