为什么 Porter Stemmer 会产生一个可以再次词干的字符串?

发布于 2024-08-03 03:39:23 字数 205 浏览 3 评论 0原文

茎('苹果')='苹果'
茎('苹果')='appl'
茎('appl')='appl'

这不是词干算法的一个缺陷吗?

(这是使用 Porter 词干算法

stem('apples')='apple'

stem('apple')='appl'
stem('appl')='appl'


isn't this a flaw in the stemming algorithm?

(this is using the Porter Stemming Algorithm)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抠脚大汉 2024-08-10 03:39:23

这看起来更像是您正在使用的算法实现中的一个错误。

当我按照原始算法中的步骤(来自您链接到的页面)时,“apples”最后的“s”在步骤 1a 中被删除,“e”在步骤 5a 中被删除,因此“apples”的词干也是“appl”。

That looks more like a bug in the implementation of the algorithm you're using.

When I follow the steps in the original algorithm (from the page you linked to), the final "s" from "apples" is removed in step 1a, and the "e" in step 5a, so the stem of "apples" is also "appl".

拿命拼未来 2024-08-10 03:39:23

我在这里找到了带有字典支持的波特词干算法的实现 http://preciselyconcise.com/apis_and_installations/smart_stemmer。 php.

这个 API 使用起来非常简单,而且词干词的拼写错误也得到了纠正。我建议您使用这个词干分析器,因为这个 API 具有自动更正词干词的选项。

I found an implementation of porter stemming algorithm with a dictionary support here http://preciselyconcise.com/apis_and_installations/smart_stemmer.php.

This API was really simple to use and the stemmed words were corrected for mistakes in spelling. I would suggest you using this stemmer since this API has an auto correct option of the stemmed words.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文