由未收录词A、B、C等组成的任意组合在搜索时没有结果的问题。
解决方案很简单在设置中UnknownWordIdentify选项置为False就可以了。
下面是Pangu代码中处理段:
if (count == 0)
{
if (_Options.UnknownWordIdentify)
{
WordInfo wi = new WordInfo();
wi.Word = orginalText;
wi.Position = 0;
wi.WordType = WordType.None;
wi.Rank = 1;
result.AddFirst(wi);
return result;
}
else
{
int position = 0;
foreach (char c in orginalText)
{
WordInfo wi = new WordInfo();
wi.Word = c.ToString();
wi.Position = position++;
wi.WordType = WordType.None;
wi.Rank = 1;
result.AddLast(wi);
}
return result;
}
}