波特词干算法实现问题? [英] porter stemming algorithm implementation question?
问题描述
我正在尝试实现搬运程序阻止算法,但此时此刻我被困住了:
I am trying to implement porter stemming algorithm but i am stuck at this point:
步骤1b
Step 1b
(m>0) EED -> EE feed -> feed
agreed -> agree
(*v*) ED -> plastered -> plaster
bled -> bled
(*v*) ING -> motoring -> motor
sing -> sing
feed的m等于1吗? feed >> [c] vvc [] >> [c] vc []。
Isn't the m of feed equal 1? feed >> [c]vvc[] >>[c]vc[].
如果是这样,他为什么不将feed转换为费用
i知道这是错误的,任何人都可以解决吗?
If it was so why didn't he convert feed to fee i know it is wrong ,can any one clear that up?
您可以在此处 http://tartarus.org/~martin/PorterStemmer/def.txt
谢谢
推荐答案
m的提要确实为1。但是,您需要仔细阅读文档。条件中的m是指茎的尺寸,即您需要在替换后的 中进行计算。就您而言,检查 feed->费用
有效,您计算出m(fee)= 0,因此无需进行替换。
m of 'feed' is indeed 1. Yet, you need to re-read the document carefully. The m in the condition refers to the measure of the stem, that is you need to calculate in after the replacement. In your case to check if feed -> fee
is valid, you calculate m(fee) = 0, hence you don't do the replacement.
还要感谢算法!真有趣!
Also thanks for the algorithm! It was interesting!
这篇关于波特词干算法实现问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!