Exemplo n.º 1
0
 public Context(char[] segmentBuff, bool isMaxWordLength)
 {
     this.isMaxWordLength = isMaxWordLength;
     this.segmentBuff = segmentBuff;
     this.buffLocker = new HashSet<ISegmenter>();
     this.lexemeSet = new IKSortedLinkSet();
 }
Exemplo n.º 2
0
 /// <summary>
 /// 重置上下文
 /// </summary>
 public void ResetContext()
 {
     buffLocker.Clear();
     lexemeSet = new IKSortedLinkSet();
     buffOffset = 0;
     available = 0;
     lastAnalyzed = 0;
     cursor = 0;
 }