Reputation: 4319
I need to find out the "answer type detection" from a question. Is there any open api, which will provide me answer type like
"Where should we go for coffee" Here the answer type will be location
Upvotes: 0
Views: 753
Reputation: 3550
Build a large training set like this:
question1 type1
question2 type2
...
Then train a classifier using bag of word models of questions as features of each question and typei as label.
After training, your classifier will be able to predict the label (question type) of a new sample.
To learn how to build a classification model easily you can use sklearn as in here.
To build your training dataset, you can have questions and question types yourself or you can use existing dataset as in here
Upvotes: 1