Answer the question
In order to leave comments, you need to log in
How to understand a text message?
We need an algorithm for parsing text and parsing into parameters for the API.
For example, a request to the API has two parameters: count
- a number less than 50 type
- the value can be a series or a movie
Some mechanism is needed to understand the text in different formulations and return the parameters.
getParams('Сериал') // -> { type: 'сериал' }
getParams('Покажи мне сериал') // -> { type: 'сериал' }
getParams('Покажи мне 10 лучших сериалов') // -> { count: 10, type: 'сериал' }
getParams('Какой самый популярный фильм?') // -> { type: 'фильм' }
getParams('Топ 15 фильмов 90-х годов?') // -> { count: 15, type: 'фильм' }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question