public override string MorphoInfoToString(MorphoInformation morpho)
        {
            StringBuilder result = new StringBuilder();

            result.Append(morpho.GetPropertyCode(morpho.Case));
            result.Append(morpho.GetPropertyCode(morpho.Gender));
            result.Append(morpho.GetPropertyCode(morpho.Number));
            result.Append(morpho.GetPropertyCode(morpho.Animation));
            result.Append(morpho.GetPropertyCode(morpho.Face));
            return(result.ToString());
        }
Example #2
0
 /// <summary>
 /// Проверка согласованности двух морфологических вариантов по числу и роду
 /// </summary>
 /// <param name="first">первый морфологический вариант</param>
 /// <param name="second">второй морфологический вариант</param>
 /// <returns>результат проверки</returns>
 private bool IsNumberAndGenderIntersection(MorphoInformation first, MorphoInformation second)
 {
     if (second.Number == Number.Plural)
     {
         return(true);
     }
     else if ((first.Number == second.Number) || (second.Number == Number.Undefined))
     {
         return(IsIntersection(first.Gender, second.Gender));
     }
     return(false);
 }
        public override MorphoInformation ParseMorphoInfo(string morpho)
        {
            MorphoInformation result = new MorphoInformation();

            result.SetCaseFromCode(morpho[MorphoInfo.Case]);
            result.SetGenderFromCode(morpho[MorphoInfo.Gender]);
            result.SetNumberFromCode(morpho[MorphoInfo.Number]);
            result.SetTransitionalFromCode(morpho[MorphoInfo.Transitional]);
            result.SetFaceFromCode(morpho[MorphoInfo.Face]);
            result.SetVoiceFromCode(morpho[MorphoInfo.Voice]);
            return(result);
        }
        public override MorphoInformation ParseMorphoInfo(string morpho)
        {
            MorphoInformation result = new MorphoInformation();

            if (!string.IsNullOrEmpty(morpho))
            {
                result.SetCaseFromCode(morpho[MorphoInfo.Case]);
                result.SetGenderFromCode(morpho[MorphoInfo.Gender]);
                result.SetNumberFromCode(morpho[MorphoInfo.Number]);
                result.SetAnimationFromCode(morpho[MorphoInfo.Animation]);
                result.SetFaceFromCode(morpho[MorphoInfo.Face]);
            }
            return(result);
        }
Example #5
0
 /// <summary>
 /// Преобразует заданный объект MorphoInformation в его строковый эквивалент
 /// </summary>
 /// <param name="morpho">объект MorphoInformation</param>
 /// <returns>строковый эквивалент</returns>
 public abstract string MorphoInfoToString(MorphoInformation morpho);
 public override string MorphoInfoToString(MorphoInformation morpho)
 {
     return("");
 }
 public AdditionalEntityInfo(string type)
     : base(new EntityTypeStructure() { EntityType = null, CustomType = type })
 {
     Morpho = new MorphoInformation[] { new MorphoInformation() };
 }