How to proceed with NLP task for recognizing intent and slots

后端 未结 3 1305
旧巷少年郎
旧巷少年郎 2020-12-23 10:50

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 i

3条回答
  •  青春惊慌失措
    2020-12-23 11:00

    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 weekend in Chicago
    

    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.

提交回复
热议问题