/// <summary> /// Анализ неразмеченного текста /// </summary> /// <param name="text">неразмеченный текст</param> private void AnalyzeUnmarkedText(UnmarkedText text) { if (IsSubSentenceSeparator(text)) { _hierarchy.CreateNewSubSentence(text); } }
/// <summary> /// Заполнение заданного подпредложения /// </summary> /// <param name="subSentence">родительское подпредложение</param> /// <param name="childSubSentences">дочерние подпредложения</param> protected void FillSubSentence(SubSentence subSentence, IEnumerable <SubSentence> childSubSentences) { IEnumerable <UnitTextBase> decomposingUnits = subSentence.Units; if (!subSentence.Units.Any(_ => _.ParentObject == subSentence)) { var unit = new UnmarkedText("", subSentence.Units.Last().PositionInfo.End) { ParentObject = subSentence }; decomposingUnits = decomposingUnits.Union(new UnitTextBase[] { unit }); } decomposingUnits.DecomposedUnits(childSubSentences.Union(new SubSentence[] { subSentence })); subSentence.AppendSubSentences(childSubSentences); }
/// <summary> /// Кодирование юнита неразмеченного текста /// </summary> /// <param name="unmarked">юнит неразмеченного текста</param> /// <returns>закодированное значение</returns> private static string CodeUnmarked(UnmarkedText unmarked) { if (unmarked.IsSeparator(",")) { return(","); } else if (DictionaryResource.IsNegotiationParticle(unmarked.Text)) { return("neg"); } else if (DictionaryResource.IsOtherEnumeration(unmarked.Text)) { return("etc"); } return("other"); }
/// <summary> /// Кодирование юнита неразмеченного текста /// </summary> /// <param name="unmarked">юнит неразмеченного текста</param> /// <returns>закодированное значение</returns> private static string CodeUnmarked(UnmarkedText unmarked) { return("other"); }