-1

I'm not sure this is the right fit for stackoverflow but maybe you guys would suggest where to put this question otherwise but here it is anyway. Suppose I have a few sentences of a text like this:

John reads newspapers everyday. Right now he has just finished reading one. He will read another one and might even read a small book tomorrow.

This small extract contains the following grammar units:

  1. present simple (reads)
  2. present perfect (has finished)
  3. future simple (will read)
  4. modal verb may

Do you know of any software, algorithm or study that defines rules for identifying these grammar patterns?

Max Koretskyi
  • 101,079
  • 60
  • 333
  • 488

2 Answers2

1

Read this also if you are going to use Ruby than you can use TreeTop or find the equivalent parser in other programming language.

Amit Singh
  • 134
  • 12
1

NTLK is a natural language parser for python, it works by tagging words. You can look at some examples here. It creates a parse-tree, which are very useful for these types of problems.

I haven't seen it distinguish between simple and perfect, but it could be modified to do so.

Alter
  • 3,332
  • 4
  • 31
  • 56