0

My aim is to extract entity relationship from a text file. I don't know much how the output should be. I took the input (aaa.txt):

My school situated in Kolkata. The color of the sky is pink. I wonder why?

and got the output:

(S
  My/PRON
  (NP school/NOUN)
  situated/VERB
  in/ADP
  (NP Kolkata/NOUN)
  ./.
  (NP The/DET color/NOUN)
  of/ADP
  (NP the/DET sky/NOUN)
  is/VERB
  (NP pink/NOUN)
  ./.
  I/PRON
  wonder/VERB
  why/ADV
  ?/.)

Is it completely correct? These kinds of problems are not very clear to me, as I am a beginner in both Python and NLTK, and could not find any good clarification from Google. Can the output be presented in a better format (Tree, Tabular etc.) ?

Salah
  • 177
  • 1
  • 11

0 Answers0