How to linguistically parse English Text?

225 views Asked by At

Is there a way to linguistically parse English text? I mean get something like this?

I{I,pronoun} am{to be, verb, Present Simple} late{late, adverb}.

Or even better with dependencies, like:

I -> am -> (what?) -> late.

Better in Java, but it doesn't matter much.

2

There are 2 answers

0
Maksym On

There are a lot of linguistic dictionaries across the internet.

You should just download one of them, parse and use it for your needs...

You also should consider mistakes and other stuff that can take place , for this you should consider Natural language processing, look here

0
GAM PUB On

The NLTK package is meant to do what you want : http://www.nltk.org/

import nltk
sentence="I'm late."
words=nltk.word_tokenize(sentence)
tagged=nltk.pos_tag(words)
>>>>tagged
[('I', 'PRP'), ("'m", 'VBP'), ('late', 'JJ'), ('.', '.')]