Exemplo n.º 1
0
 public CyrNoun(CyrNoun source)
 {
     this.Name     = source.Name;
     this.Gender   = source.Gender;
     this.Animate  = source.Animate;
     this.WordType = source.WordType;
     this.rules    = source.rules;
 }
Exemplo n.º 2
0
 public CyrNoun(string Name, string CollectionName, GendersEnum Gender, AnimatesEnum Animate, WordTypesEnum Type, CyrRule[] Rules)
 {
     this.collectionName = CollectionName;
     this.name           = Name;
     this.gender         = Gender;
     this.animate        = Animate;
     this.type           = Type;
     this.rules          = Rules;
 }
Exemplo n.º 3
0
        protected virtual string GetWordTypeStringRu(WordTypesEnum wordType)
        {
            switch (wordType)
            {
            case WordTypesEnum.Abbreviation: return("аббревиатура");

            case WordTypesEnum.Name: return("имя");

            case WordTypesEnum.Surname: return("фамилия");

            case WordTypesEnum.Patronymic: return("отчество");

            case WordTypesEnum.Toponym: return("топоним");

            case WordTypesEnum.Organization: return("организация");

            default: return(string.Empty);
            }
        }
Exemplo n.º 4
0
        public CyrNoun(string name, string collectionName, GendersEnum gender, AnimatesEnum animate, WordTypesEnum type, CyrRule[] rules)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            if (rules == null)
            {
                throw new ArgumentNullException(nameof(rules));
            }

            if (rules.Length % rulesPerNoun != 0)
            {
                throw new ArgumentException(nameof(rules), $"Noun rules collection must have {rulesPerNoun} * N elements.");
            }

            this.Name     = name;
            this.Gender   = gender;
            this.Animate  = animate;
            this.WordType = type;
            this.rules    = rules;
        }
Exemplo n.º 5
0
 public CyrNoun(string Name, GendersEnum Gender, AnimatesEnum Animate, WordTypesEnum Type, CyrRule[] Rules)
     : this(Name, Name, Gender, Animate, Type, Rules)
 {
 }
Exemplo n.º 6
0
        public WordTypeModel(WordTypesEnum value)
        {
            this.Value = value;

            switch (value)
            {
            case WordTypesEnum.Abbreviation:
                this.Name = "Аббревиатура";
                break;

            case WordTypesEnum.Comparative:
                this.Name = "Сравнительная степень на по-";
                break;

            case WordTypesEnum.ComparativeEj:
                this.Name = "Форма компаратива на -ей";
                break;

            case WordTypesEnum.FormEy:
                this.Name = "Форма на -ею";
                break;

            case WordTypesEnum.FormOy:
                this.Name = "Форма на -ою";
                break;

            case WordTypesEnum.Name:
                this.Name = "Имя";
                break;

            case WordTypesEnum.Ordinal:
                this.Name = "Порядковое";
                break;

            case WordTypesEnum.Organization:
                this.Name = "Организация";
                break;

            case WordTypesEnum.Patronymic:
                this.Name = "Отчество";
                break;

            case WordTypesEnum.Possessive:
                this.Name = "Притяжательное";
                break;

            case WordTypesEnum.Pronominal:
                this.Name = "Местоименное";
                break;

            case WordTypesEnum.Qualitative:
                this.Name = "Качественное";
                break;

            case WordTypesEnum.Superlative:
                this.Name = "Превосходная степень";
                break;

            case WordTypesEnum.Surname:
                this.Name = "Фамилия";
                break;

            case WordTypesEnum.Toponym:
                this.Name = "Топоним";
                break;

            case WordTypesEnum.TradeMark:
                this.Name = "Торговая марка";
                break;

            case WordTypesEnum.None:
            default:
                this.Name = null;
                break;
            }
        }
Exemplo n.º 7
0
 public CyrNoun(string name, GendersEnum gender, AnimatesEnum animate, WordTypesEnum type, CyrRule[] rules)
     : this(name, name, gender, animate, type, rules)
 {
 }