Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to proceed with NLP task for recognizing intent and slots

Tags:

I wanted to write a program for asking questions about weather. What are the algorithms and techniques I should start looking at.

ex: Will it be sunny this weekend in Chicago. I wanted to know the intent = weather query, date = this weekend, location = chicago.

User can express the same query in many forms.

I would like to solve some constrained form and looking for ideas on how to get started. The solution needs to be just good enough.

like image 721
searav Avatar asked Jul 24 '12 05:07

searav


People also ask

What is intent recognition in NLP?

Intent Classification, or you may say Intent Recognition is the labour of getting a spoken or written text and then classifying it based on what the user wants to achieve. This is a form of Natural Language Processing(NLP) task, which is further a subdomain of Artificial Intelligence.

What is slot in NLP?

Slot filling is identifying contiguous spans of words in an utterance that correspond to certain parameters (i.e., slots) of a user request/query.

What is intent detection and slot filling?

Intent detection and slot filling are the main tasks to solve when approaching the problem of Natural Language Understanding (NLU) in a conversational system. The two tasks are used to obtain a structured representation of the meaning of the utterance, so that it can be processed by a computer.

What is intent detection?

Intent Detection is a vital component of any task-oriented conversational system. In order to understand the user's current goal, the system must leverage its intent detector to classify the user's utterance (provided in varied natural language) into one of several predefined classes, that is, intents.


Video Answer


1 Answers

Since your input is in the natural language form, best way to start looking into it, first by parsing the sentence structure. and running the sentence through NER (Named Entity Recognizer).

Parsing the sentence lets you come up with rules such as, certain types of dependencies always give you the intent. Running the NER will let you identify places and dates. If it's not simple to come up with rules to classify the intent, you can as well use a classifier to do the same using feature vector formulated from the input sentence. In fact some of the parser out put can go into formulating the feature vector.

For both there exists software's from Stanford NLP Group

May be you can look into:

  • Stanford parser
  • Stanford NER Tagger

Once you parse the sentence, you have intent and other information require to answer the question.

Ex: I took your sentence "Will it be sunny this weekend in Chicago." and ran it through Online Stanford NER Tagger. Which gave me the following:

Will it be sunny this <DATE>weekend</DATE> in <LOCATION>Chicago</LOCATION> 

Now you have identified date and location.

I hope this helps. I know the answer is quite generic, and may be helpful in just getting started.

like image 172
darshan Avatar answered Sep 23 '22 17:09

darshan