Exemple #1
0
 public static bool IsErrorResult(ParsingResult value)
 {
     if (value.Value == ParsingOK.Value)
         return false;
     if (value.Value == ErrorPartiallyCorrect.Value || value.Value == ErrorNoCorrectStructure.Value)
         return true;
     if (value.Value == Undefined.Value)
     {
         throw new IndexOutOfRangeException();
     }
     return true;
 }
        protected override void DoProcess(BaseSentenceAlgorithmData sourceData, BaseSentenceAlgorithmData algResult)
        {
            var parsingResult = ParsingResult.Undefined;

            if (InitialText.Length > 0)
            {
                algResult.Sentence = ComprenoApiClient.Instance.ParseSentenceForParsingResult(InitialText,
                    out parsingResult);
                ParsingResult = parsingResult;
            }
            else

                throw new Exception("Исходный текст предложения пуст");
        }