Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#: Grammar rules engine for English? [closed]

Tags:

c#

rule-engine

I'm looking for something that may or may not exist. Is there such a thing as an 'English grammar rules engine' available on the Windows platform (specifically for something like .NET or C#)?

Specifically, I'm looking for something that would be able to take a sentence in the 'future tense' and change it to the 'past tense' (based on English grammar rules) ... like:

Work on widget software and then meet with Ricardo

to this:

Worked on widget software and then met with Ricardo

Is there a rules engine that does that already?

like image 354
Dan Esparza Avatar asked Mar 04 '09 23:03

Dan Esparza


3 Answers

Talk to this guy, he might have some ideas for you. In general, English is too ambiguous for this type of thing. For example:

Cut paper in half.

Is this an imperative command, or a past-tense sentence fragment? And my personal favourite:

Time flies like an arrow; fruit flies like a banana.

Any human can parse that, but only because of a great deal of semantic knowledge.

That being said, there are some things that might be worth looking into, like SharpNLP

like image 139
Eclipse Avatar answered Nov 08 '22 00:11

Eclipse


As others have stated, this is a very hard problem and has not been solved in the general case. However, there are some systems that do pretty well. Princeton's WordNet is one of them. It can identify parts of speech, synonyms, etc (perhaps including tense) with some degree of accuracy. I think you may be interested in these functions, which appear to find the root of a word given a particular conjugation and may also be able to find a particular conjugation given the root (but that page doesn't provide examples, so I can't be sure I'm interpreting the docs correctly).

like image 34
rmeador Avatar answered Nov 08 '22 02:11

rmeador


The short answer is no, general NLP parsing engines don't exist.

The long answer is "kinda", but there's 50 years of research showing that it's a Very Hard Problem, in the general case. There might be one doing specific tense transformations. Regardless, C# probably won't have one.

like image 2
Paul Nathan Avatar answered Nov 08 '22 00:11

Paul Nathan