How to know if two words have the same base?

2019-03-11 06:31发布

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

标签: c# grammar nlp
2条回答
小情绪 Triste *
2楼-- · 2019-03-11 07:03

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

查看更多
聊天终结者
3楼-- · 2019-03-11 07:10

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

http://snowball.tartarus.org/

查看更多
登录 后发表回答