Jorge
Jorge

Reputation: 95

How would I go about categorizing sentences according to tense (present, past, future, etc.)?

I want to parse a text and categorize the sentences according to their grammatical structure, but I have a very small understanding of NLP so I don't even know where to start.

As far as I have read, I need to parse the text and find out (or tag?) the part-of-speech of every word. Then I search for the verb clause or whatever other defining characteristic I want to use to categorize the sentences.

What I don't know is if there is already some method to do this more easily or if I need to define the grammar rules separately or what.

Any resources on NLP that discuss this would be great. Program examples are welcome as well. I have used NLTK before, but not extensively. Other parsers or languages are OK too!

Upvotes: 2

Views: 1374

Answers (2)

Senthil Kumaran
Senthil Kumaran

Reputation: 56813

Python Natural Language Toolkit is a library which is suitable for doing such a work. As with any NLP library, you will have to download the dataset for training separately and corpus(data) and scripts for training are available too.

There are also certain example tutorials which will help you identify parts of the speech for words. By all means, I think nltk.org should be the place to go for what you are looking for.

Specific questions could be posted here again.

Upvotes: 3

Andrey Sboev
Andrey Sboev

Reputation: 7672

May be you need simply define patterns like "noun verb noun" etc for each type of grammatical structure and search matches in part-of-speach tagger output sequence.

Upvotes: 0

Related Questions