You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
segmenter.Cut2 是在Cut基础上返回每个词的起始位置。
返回的是IEnumerable<WordInfo>
WordInfo
public class WordInfo
{
public WordInfo(string value,int position)
{
this.value = value;
this.position = position;
}
//分词的内容
public string value { get; set; }
//分词的初始位置
public int position { get; set; }
}
segmenter.Cut
segmenter.CutForSearch
segmenter.Cut2
这些分词效果都是在什么时候应用,并且这个分词的效果没问题。
之前pangu分词是 foreach (WordInfo word in words)
{
if (word == null)
{
continue;
}
result.AppendFormat("{0}^{1}.0 ", word.Word, (int)Math.Pow(3, word.Rank));
}
现在是JieBa分词,该怎么得到
The text was updated successfully, but these errors were encountered: