编程的方式确定相关词汇? [英] Programmatic Way to Determine Related Words?

查看:108
本文介绍了编程的方式确定相关词汇?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Web服务或软件库,我希望能够通过辨别根词相关的词(如坐和安全带共享根词座位,但西雅图不会被认为是匹配)。简单的字符串比较似乎是不可行的这样的事情。

Using a web service or software library, I'd like to be able to discern words related by a root word (e.g., "seated" and "seatbelt" share the root word "seat" but "Seattle" wouldn't be considered a match). Simple string comparison seems unfeasible for this sort of thing.

定义我自己的字典短,是否有不能只返回字定义的库或Web服务,但回报一个字的根词这样我就可以进行此类检查

Short of defining my own dictionary, are there any libraries or web services that can not merely return word definitions, but return a word's "root words" so I can perform this type of check?

推荐答案

这里是英语雪球词干。

您可以使用它作为:

SF.Snowball.Ext.EnglishStemmer eng = new SF.Snowball.Ext.EnglishStemmer();
eng.SetCurrent("Seated");
eng.Stem();
Console.WriteLine(eng.GetCurrent()); //returns Seat

这篇关于编程的方式确定相关词汇?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆