Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的项目中使用了搬运工词干分析器(使用 python)。但我在输出中看到一些错误。例如,术语“introductory”更改为“introductori”而不是“introduct”。有可能改善这个结果吗?
为什么你认为这是一个错误?算法中的第 2 步Porter Stemmer指出:
Porter Stemmer
当词干中有另一个元音时,Step2() 将终端 'y' 转换为 'i'。
所以introductory确实应该转换为introductori
introductory
introductori
也就是说,如果你确实想把它分解成一个基本词,你可以这样做Step4()
Step4()
case 'i': if (ends("iciti")) { r("ic"); break; } if (ends("tori")) { r("t"); break; } break;