Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know if two words have the same base?

Tags:

c#

nlp

grammar

I want to know, in several languages, if two words are:

  • either the same word,
  • or the grammatical variants of the same word.

For example:

  • had and has has the same base: in both cases, it's the verb have,
  • city and cities has the same base.
  • went and gone has the same base.

Is there a way to use the Microsoft Word API to not just spell check text, but also normalize a word to a base or, at least, determine if two words have the same base?

If not, what are the (free or paid) libraries (not web services) which allow me to do it (again, in several languages)?

like image 656
Arseni Mourzenko Avatar asked Jan 13 '12 19:01

Arseni Mourzenko


2 Answers

Inflector.NET is an open source library that you can use to normalize the inflection of English nouns. Available at: https://github.com/davidarkemp/Inflector/tree/master/Inflector

like image 107
smartcaveman Avatar answered Sep 20 '22 15:09

smartcaveman


Snowball is a stemming API that can handle various natural languages and there are Snowball implementations for various programming languages.

http://snowball.tartarus.org/

like image 32
Sprachprofi Avatar answered Sep 19 '22 15:09

Sprachprofi