/// <summary> /// 子句结束处理函数 /// </summary> private void subSentenceEnd(char ch) { /**************** * 确定是否为子句添加一个标点 * 如果子句以空格结束 * ************************/ var w = new _WordInnfo(); if (MarkHelper.IsSubSentenceEndMark(ch)) { w.Name = ch.ToString(); } else if (MarkHelper.IsSentenceEndMark(ch)) { w.Name = ch.ToString(); } else { w.Name = '。'.ToString(); } w.MaxType = WordType.Mark; _susentence.Words.Add(w); _susentence.Position.End = _currentPos; _isSubsentenceStarted = false; /****************** * 是否执行分次结果检测 * ****************/ if (_config.IsReflex) { _checker.Check(_susentence.Words); } /************************* * 发布子句解析完成事件 * ********************/ if (SubSenceFinish != null) { SubSenceFinish(_paragraph); } }
/// <summary> /// 检查是否是句子结束 /// 如果是,结束句子 /// </summary> /// <returns></returns> private bool isSentenceEnd() { if (!MarkHelper.IsSentenceEndMark(_token)) { return(false); } else { /*************** * 不等于0 * 说明此时工作在searchtree * 不进行结束句子的操作 * *************************/ if (_serachTime != 0) { return(false); } else { sentenceEnd(_token); return(true); } } }