Question-Answering using Basic NLP
Published:
The chatbots these days are very advanced and can answer complex queries but here I have some basic NLP concepts and made simple Question Answering System which answer questions like who, where, what type question. The idea is that typically for such questions the answer is a single word and is a noun. So first take our text then using coreference we replace all prnouns with appropriate nouns. Now in the transformed text we look for the sentence which is most similar to our query. To do this we do part of speech tagging on the sentence and extract all the nouns and verbs from the sentence. Now the relevant sentence will have most nouns and verbs in common with query. We are focusing on nouns and verbs because other parts of speech just make the sentence more descriptive to humans but the main content is added by nouns and verbs. Once we obtain the relevant sentence we just output the nouns/proper nouns in the sentence as our answers. Here is a tutorial to make such a system in Python.
If you liked the tutorial and have an account on Kaggle do leave an upvote! Cheers!