Lab Assignment 1 B - SaratM34/KDM-Lab-Assignments GitHub Wiki
Name: Mudunuri Sri Sai Sarat Chandra Varma
ClassID: 14
Mail: [email protected]
Objective: The objective of this lab is to perform NLP tasks(POS, NER, Co-reference resolution system) on given sentences manually and to perform tasks on datasets using CoreNLP. Finally, create a simple question answering system.
IDE's used:
- Intellij
- PyCharm
- saw-VBD
- dog-NN
- The-DT
- John-NNP
- park-NN
- in-In
- the-DT
- The-The
- dog-ANIMAL
- saw-saw
- John-PERSON
- in-in
- the-the
- park-PLACE
- As it is a single sentence Co-reference resolution cannot be generated.
- saw-VBD
- bear-NN
- The-DT
- little-JJ
- trout-NNS
- the-DT
- fat-JJ
- fine-JJ
- brook-NN
- in-IN
- the-DT
- rocky-JJ
- ./. (punct)
- The-The
- little-little
- bear-ANIMAL
- saw-saw
- the-the
- fine-fine
- fat-fat
- trout-trout
- in-in
- the-the
- rocky-rocky
- brook-brook
- -13--13
- As it is a single sentence Co-reference resolution cannot be generated.
Input: I have taken an dataset file from entertainment and given as input.
- Reading input from a file
Steps: I given a datasets(Politics, Entertainment and Sports) as input and created some questions based on the text in the dataset. I have given two files as input to the program one questions file and one story file i.e the dataset. The program runs the question file takes each question process it based on the dataset given and gives the answer. I have created a total of 9 questions (What, Where, Who). And prints no answer if answer not found. The program returns person name for Who question, location name for where and information for the What question based on the given dataset.
Output:
- In the below screenshots QuesstionID is the questions and Answer is retrieved by processing the given dataset based on the question.