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.
我打算使用本文中的 n-gram代码。该算法产生这些三元组结果:
t, th, the, he, e, q, qu, qui, uic, ick, ck, k, r, re, red, ed, d
对于文本the quick red
the quick red
然而wikipedia认为它应该是:
the qui k_r he_ uic _re e_q ick red _qu ck_
(由“_”表示的空格)。
什么是正确的?还有其他 C# 实现吗?
第二个例子是正确的。
附言。为什么你要为完整的文本而不只是为单词生成三元组?你的用例是什么?
第一个是正确的。我在我的论文中使用了字符 N-gram。您必须向前移动并每一步传递一个字符。在这种情况下,可以找到相似的词。