A
A
Artem Vishnevsky2015-12-14 14:42:00
Neural networks
Artem Vishnevsky, 2015-12-14 14:42:00

How to determine the meaning of user input using semantics or neural networks?

Hi all! In this matter, I'm a noob, so I'm asking for help.
The task is as follows: There is some bot that gives the user a text and expects a certain answer from the user, this answer can be stated in any form. The bot must somehow process this text and understand whether the information was reported to it or not.
For example: The bot asks the user to tell him some fact, say, what is the height of Everest?
possible answers:
- 8842m
- I don't remember exactly, about 9 km.
- 9669 yards
- Everest? What it is? =)
... etc.
Accordingly, the bot must be able to learn.
What solutions can be used? A similar solution is used by chat bots, but I could not find a single intelligible description of the principle of their work, and even more so of some code (I will be grateful for the links).
If you use neural networks, how can you normalize the text? Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Wolf, 2015-12-14
@mannaro

Hehe, chatbots work like this:
Where arr[0] - question, arr[1] = answers - possible answers, where answers[i] - regular expression for parsing answers.

D
doktr, 2015-12-22
@doktr

If the main task of the bot is to determine whether the answer to the question is correct or not (y=1 or y=0),
then this is a classification task.
For training, you need to have sets (for several measurement results) at the input
of one or more variables (x1, x2, x3 . Etc., and x1=1),
each such set corresponds to a certain value of y (equal to 0 or 1) .
It is necessary to choose such a logistic regression equation h(x) so that for h(x)>=0.5 y is equal to 1, and for h(x)<0.5 y=0. To do this, using the cost estimate on the training set, the coefficients at x are selected - theta1, theta2, theta3, etc. 99%), correct or not.
As Xs, you can use data from both the question (if they are not continuous numeric, but words - for example, "Everest", "altitude", then these words will correspond to the discrete values ​​​​of the corresponding variables), and from the answer (for numerical values ​​\u200b\u200b- continuous, for words and units of measurement - discrete).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question