简体   繁体   中英

How to know if two words have the same base?

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)?

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

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

http://snowball.tartarus.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM