improving recognition

This commit is contained in:
Vladislav Khorev 2014-12-01 07:13:51 +00:00
parent ac5ea38c9f
commit 40388ffbb3
8 changed files with 1458 additions and 1340 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,168 +1,193 @@
FIRST_A_IFORM_SINGULAR;NGC_P1_NOMINATIVE;а;рука
;NGC_P2_GENITIVE;и;подарок для руки
;NGC_P3_DATIVE;е;подарок руке
;NGC_P4_ACCUSATIVE;у;обвиняю руку
;NGC_P5_INSTRUMENTAL;ой;говорю с рукой
;NGC_P6_PREPOSITIONAL;е;говорю о руке
FIRST_A_IFORM_INANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;руки
;NGC_P2_GENITIVE;;подарок для рук
;NGC_P3_DATIVE;е;подарок рукам
;NGC_P4_ACCUSATIVE;и;обвиняю руки
;NGC_P5_INSTRUMENTAL;ами;говорю с руками
;NGC_P6_PREPOSITIONAL;ах;говорю о руках
FIRST_A_IFORM_ANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;бабушки
;NGC_P2_GENITIVE;;подарок для бабушек
;NGC_P3_DATIVE;е;подарок бабушкам
;NGC_P4_ACCUSATIVE;;обвиняю бабушек
;NGC_P5_INSTRUMENTAL;ами;говорю с бабушками
;NGC_P6_PREPOSITIONAL;ах;говорю о бабушках
FIRST_A_UFORM_SINGULAR;NGC_P1_NOMINATIVE;а;лапа
;NGC_P2_GENITIVE;ы;подарок для лапы
;NGC_P3_DATIVE;е;подарок лапе
;NGC_P4_ACCUSATIVE;у;обвиняю лапу
;NGC_P5_INSTRUMENTAL;ой;говорю с лапой
;NGC_P6_PREPOSITIONAL;е;говорю о лапе
FIRST_A_UFORM_INANIMATE_PLURAL;NGC_P1_NOMINATIVE;ы;лапы
;NGC_P2_GENITIVE;;подарок для лап
;NGC_P3_DATIVE;ам;подарок лапам
;NGC_P4_ACCUSATIVE;ы;обвиняю лапы
;NGC_P5_INSTRUMENTAL;ами;говорю с лапами
;NGC_P6_PREPOSITIONAL;ах;говорю о лапах
FIRST_A_UFORM_ANIMATE_PLURAL;NGC_P1_NOMINATIVE;ы;папы
;NGC_P2_GENITIVE;;подарок для пап
;NGC_P3_DATIVE;ам;подарок папам
;NGC_P4_ACCUSATIVE;;обвиняю пап
;NGC_P5_INSTRUMENTAL;ами;говорю с папами
;NGC_P6_PREPOSITIONAL;ах;говорю о папах
FIRST_YA_FORM_SINGULAR;NGC_P1_NOMINATIVE;я;пуля
;NGC_P2_GENITIVE;и;подарок для пули
;NGC_P3_DATIVE;е;подарок пуле
;NGC_P4_ACCUSATIVE;ю;обвиняю пулю
;NGC_P5_INSTRUMENTAL;ей;говорю с пулей
;NGC_P6_PREPOSITIONAL;е;говорю о пуле
FIRST_YA_FORM_INANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;пули
;NGC_P2_GENITIVE;ь;подарок для пуль
;NGC_P3_DATIVE;ям;подарок пулям
;NGC_P4_ACCUSATIVE;и;обвиняю пули
;NGC_P5_INSTRUMENTAL;ями;говорю с пулями
;NGC_P6_PREPOSITIONAL;ях;говорю о пулях
FIRST_YA_FORM_ANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;тети
;NGC_P2_GENITIVE;ь;подарок для теть
;NGC_P3_DATIVE;ям;подарок тетям
;NGC_P4_ACCUSATIVE;ь;обвиняю теть
;NGC_P5_INSTRUMENTAL;ями;говорю с тетями
;NGC_P6_PREPOSITIONAL;ях;говорю о тетях
SECOND_MALE_IFORM_INANIMATE_SINGULAR;NGC_P1_NOMINATIVE;;бук
;NGC_P2_GENITIVE;а;подарок для бука
;NGC_P3_DATIVE;у;подарок буку
;NGC_P4_ACCUSATIVE;;обвиняю бук
;NGC_P5_INSTRUMENTAL;ом;говорю с буком
;NGC_P6_PREPOSITIONAL;е;говорю о буке
SECOND_MALE_IFORM_INANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;буки
;NGC_P2_GENITIVE;ов;подарок для буков
;NGC_P3_DATIVE;у;подарок букам
;NGC_P4_ACCUSATIVE;и;обвиняю буки
;NGC_P5_INSTRUMENTAL;ами;говорю с буками
;NGC_P6_PREPOSITIONAL;ах;говорю о буках
SECOND_MALE_IFORM_ANIMATE_SINGULAR;NGC_P1_NOMINATIVE;;рыбак
;NGC_P2_GENITIVE;а;подарок для рыбака
;NGC_P3_DATIVE;у;подарок рыбаку
;NGC_P4_ACCUSATIVE;а;обвиняю рыбака
;NGC_P5_INSTRUMENTAL;ом;говорю с рыбаком
;NGC_P6_PREPOSITIONAL;е;говорю о рыбаке
SECOND_MALE_IFORM_ANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;рыбаки
;NGC_P2_GENITIVE;ов;подарок для рыбаков
;NGC_P3_DATIVE;ам;подарок рыбакам
;NGC_P4_ACCUSATIVE;ов;обвиняю рыбаков
;NGC_P5_INSTRUMENTAL;ами;говорю с рыбаками
;NGC_P6_PREPOSITIONAL;ах;говорю о рыбаках
SECOND_MALE_UFORM_INANIMATE_SINGULAR;NGC_P1_NOMINATIVE;;зад
;NGC_P2_GENITIVE;а;подарок для зада
;NGC_P3_DATIVE;у;подарок заду
;NGC_P4_ACCUSATIVE;;обвиняю зад
;NGC_P5_INSTRUMENTAL;ом;говорю с задом
;NGC_P6_PREPOSITIONAL;е;говорю о заде
SECOND_MALE_UFORM_INANIMATE_PLURAL;NGC_P1_NOMINATIVE;ы;зады
;NGC_P2_GENITIVE;ов;подарок для задов
;NGC_P3_DATIVE;ам;подарок задам
;NGC_P4_ACCUSATIVE;ы;обвиняю зады
;NGC_P5_INSTRUMENTAL;ами;говорю с задами
;NGC_P6_PREPOSITIONAL;ах;говорю о задах
SECOND_MALE_UFORM_ANIMATE_SINGULAR;NGC_P1_NOMINATIVE;;кит
;NGC_P2_GENITIVE;а;подарок для кита
;NGC_P3_DATIVE;у;подарок киту
;NGC_P4_ACCUSATIVE;а;обвиняю кита
;NGC_P5_INSTRUMENTAL;ом;говорю с китом
;NGC_P6_PREPOSITIONAL;е;говорю о ките
SECOND_MALE_UFORM_ANIMATE_PLURAL;NGC_P1_NOMINATIVE;ы;киты
;NGC_P2_GENITIVE;ов;подарок для китов
;NGC_P3_DATIVE;ам;подарок китам
;NGC_P4_ACCUSATIVE;ов;обвиняю китов
;NGC_P5_INSTRUMENTAL;ами;говорю с китами
;NGC_P6_PREPOSITIONAL;ах;говорю о китах
SECOND_MALE_SSFORM_INANIMATE_SINGULAR;NGC_P1_NOMINATIVE;ь;тополь
;NGC_P2_GENITIVE;я;подарок для тополя
;NGC_P3_DATIVE;ю;подарок тополю
;NGC_P4_ACCUSATIVE;ь;обвиняю тополь
;NGC_P5_INSTRUMENTAL;ем;говорю с тополем
;NGC_P6_PREPOSITIONAL;е;говорю о тополе
SECOND_MALE_SSFORM_INANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;тополи
;NGC_P2_GENITIVE;ей;подарок для тополей
;NGC_P3_DATIVE;ям;подарок тополям
;NGC_P4_ACCUSATIVE;и;обвиняю тополи
;NGC_P5_INSTRUMENTAL;ями;говорю с тополями
;NGC_P6_PREPOSITIONAL;ях;говорю о тополях
SECOND_MALE_SSFORM_ANIMATE_SINGULAR;NGC_P1_NOMINATIVE;ь;парень
;NGC_P2_GENITIVE;я;подарок для парня
;NGC_P3_DATIVE;ю;подарок парню
;NGC_P4_ACCUSATIVE;я;обвиняю парня
;NGC_P5_INSTRUMENTAL;ем;говорю с парнем
;NGC_P6_PREPOSITIONAL;е;говорю о парне
SECOND_MALE_SSFORM_ANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;парни
;NGC_P2_GENITIVE;ей;подарок для парней
;NGC_P3_DATIVE;ям;подарок парням
;NGC_P4_ACCUSATIVE;ей;обвиняю парней
;NGC_P5_INSTRUMENTAL;ями;говорю с парнями
;NGC_P6_PREPOSITIONAL;ях;говорю о парнях
SECOND_NEUTRAL_E_FORM_SINGULAR;NGC_P1_NOMINATIVE;е;поле
;NGC_P2_GENITIVE;я;подарок для поля
;NGC_P3_DATIVE;ю;подарок полю
;NGC_P4_ACCUSATIVE;е;обвиняю поле
;NGC_P5_INSTRUMENTAL;ем;говорю с полем
;NGC_P6_PREPOSITIONAL;е;говорю о поле
SECOND_NEUTRAL_E_FORM_PLURAL;NGC_P1_NOMINATIVE;я;поля
;NGC_P2_GENITIVE;ей;подарок для полей
;NGC_P3_DATIVE;ям;подарок полям
;NGC_P4_ACCUSATIVE;я;обвиняю поля
;NGC_P5_INSTRUMENTAL;ями;говорю с полями
;NGC_P6_PREPOSITIONAL;ях;говорю о полях
SECOND_NEUTRAL_O_FORM_SINGULAR;NGC_P1_NOMINATIVE;о;тело
;NGC_P2_GENITIVE;а;подарок для тела
;NGC_P3_DATIVE;у;подарок телу
;NGC_P4_ACCUSATIVE;о;обвиняю тело
;NGC_P5_INSTRUMENTAL;ом;говорю с телом
;NGC_P6_PREPOSITIONAL;е;говорю о теле
SECOND_NEUTRAL_O_FORM_PLURAL;NGC_P1_NOMINATIVE;а;тела
;NGC_P2_GENITIVE;;подарок для тел
;NGC_P3_DATIVE;ам;подарок телам
;NGC_P4_ACCUSATIVE;а;обвиняю тела
;NGC_P5_INSTRUMENTAL;ами;говорю с телами
;NGC_P6_PREPOSITIONAL;ах;говорю о телах
THIRD_FORM_SINGULAR;NGC_P1_NOMINATIVE;ь;площадь
;NGC_P2_GENITIVE;и;подарок для площади
;NGC_P3_DATIVE;и;подарок площади
;NGC_P4_ACCUSATIVE;ь;обвиняю площадь
;NGC_P5_INSTRUMENTAL;ью;говорю с площадью
;NGC_P6_PREPOSITIONAL;и;говорю о площади
THIRD_FORM_INANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;площади
;NGC_P2_GENITIVE;ей;подарок для площадей
;NGC_P3_DATIVE;ям;подарок площадям
;NGC_P4_ACCUSATIVE;и;обвиняю площади
;NGC_P5_INSTRUMENTAL;ями;говорю с площадями
;NGC_P6_PREPOSITIONAL;ях;говорю о площадях
THIRD_FORM_ANIMATE_PLURAL;NGC_P1_NOMINATIVE;и;лошади
;NGC_P2_GENITIVE;ей;подарок для лошадей
;NGC_P3_DATIVE;ям;подарок лошадям
;NGC_P4_ACCUSATIVE;ей;обвиняю лошадей
;NGC_P5_INSTRUMENTAL;ями;говорю с лошадями
;NGC_P6_PREPOSITIONAL;ях;говорю о лошадях
Склонение;Род;Падеж;Окончание;Пример
FIRST_A_IFORM_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;а;рука
;;NGC_P2_GENITIVE;и;подарок для руки
;;NGC_P3_DATIVE;е;подарок руке
;;NGC_P4_ACCUSATIVE;у;обвиняю руку
;;NGC_P5_INSTRUMENTAL;ой;говорю с рукой
;;NGC_P6_PREPOSITIONAL;е;говорю о руке
;NC_PLURAL;NGC_P1_NOMINATIVE;и;руки
;;NGC_P2_GENITIVE;;подарок для рук
;;NGC_P3_DATIVE;е;подарок рукам
;;NGC_P4_ACCUSATIVE;и;обвиняю руки
;;NGC_P5_INSTRUMENTAL;ами;говорю с руками
;;NGC_P6_PREPOSITIONAL;ах;говорю о руках
FIRST_A_IFORM_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;а;бабушка
;;NGC_P2_GENITIVE;и;подарок для бабушки
;;NGC_P3_DATIVE;е;подарок бабушке
;;NGC_P4_ACCUSATIVE;у;обвиняю бабушку
;;NGC_P5_INSTRUMENTAL;ой;говорю с бабушкой
;;NGC_P6_PREPOSITIONAL;е;говорю о бабушке
;NC_PLURAL;NGC_P1_NOMINATIVE;и;бабушки
;;NGC_P2_GENITIVE;;подарок для бабушек
;;NGC_P3_DATIVE;е;подарок бабушкам
;;NGC_P4_ACCUSATIVE;;обвиняю бабушек
;;NGC_P5_INSTRUMENTAL;ами;говорю с бабушками
;;NGC_P6_PREPOSITIONAL;ах;говорю о бабушках
FIRST_A_UFORM_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;а;лапа
;;NGC_P2_GENITIVE;ы;подарок для лапы
;;NGC_P3_DATIVE;е;подарок лапе
;;NGC_P4_ACCUSATIVE;у;обвиняю лапу
;;NGC_P5_INSTRUMENTAL;ой;говорю с лапой
;;NGC_P6_PREPOSITIONAL;е;говорю о лапе
;NC_PLURAL;NGC_P1_NOMINATIVE;ы;лапы
;;NGC_P2_GENITIVE;;подарок для лап
;;NGC_P3_DATIVE;ам;подарок лапам
;;NGC_P4_ACCUSATIVE;ы;обвиняю лапы
;;NGC_P5_INSTRUMENTAL;ами;говорю с лапами
;;NGC_P6_PREPOSITIONAL;ах;говорю о лапах
FIRST_A_UFORM_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;а;папа
;;NGC_P2_GENITIVE;ы;подарок для папы
;;NGC_P3_DATIVE;е;подарок папе
;;NGC_P4_ACCUSATIVE;у;обвиняю папу
;;NGC_P5_INSTRUMENTAL;ой;говорю с папой
;;NGC_P6_PREPOSITIONAL;е;говорю о папе
;NC_PLURAL;NGC_P1_NOMINATIVE;ы;папы
;;NGC_P2_GENITIVE;;подарок для пап
;;NGC_P3_DATIVE;ам;подарок папам
;;NGC_P4_ACCUSATIVE;;обвиняю пап
;;NGC_P5_INSTRUMENTAL;ами;говорю с папами
;;NGC_P6_PREPOSITIONAL;ах;говорю о папах
FIRST_YA_FORM_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;я;пуля
;;NGC_P2_GENITIVE;и;подарок для пули
;;NGC_P3_DATIVE;е;подарок пуле
;;NGC_P4_ACCUSATIVE;ю;обвиняю пулю
;;NGC_P5_INSTRUMENTAL;ей;говорю с пулей
;;NGC_P6_PREPOSITIONAL;е;говорю о пуле
;NC_PLURAL;NGC_P1_NOMINATIVE;и;пули
;;NGC_P2_GENITIVE;ь;подарок для пуль
;;NGC_P3_DATIVE;ям;подарок пулям
;;NGC_P4_ACCUSATIVE;и;обвиняю пули
;;NGC_P5_INSTRUMENTAL;ями;говорю с пулями
;;NGC_P6_PREPOSITIONAL;ях;говорю о пулях
FIRST_YA_FORM_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;я;тетя
;;NGC_P2_GENITIVE;и;подарок для тети
;;NGC_P3_DATIVE;е;подарок тете
;;NGC_P4_ACCUSATIVE;ю;обвиняю тетю
;;NGC_P5_INSTRUMENTAL;ей;говорю с тетей
;;NGC_P6_PREPOSITIONAL;е;говорю о тете
;NC_PLURAL;NGC_P1_NOMINATIVE;и;тети
;;NGC_P2_GENITIVE;ь;подарок для теть
;;NGC_P3_DATIVE;ям;подарок тетям
;;NGC_P4_ACCUSATIVE;ь;обвиняю теть
;;NGC_P5_INSTRUMENTAL;ями;говорю с тетями
;;NGC_P6_PREPOSITIONAL;ях;говорю о тетях
SECOND_MALE_IFORM_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;;бук
;;NGC_P2_GENITIVE;а;подарок для бука
;;NGC_P3_DATIVE;у;подарок буку
;;NGC_P4_ACCUSATIVE;;обвиняю бук
;;NGC_P5_INSTRUMENTAL;ом;говорю с буком
;;NGC_P6_PREPOSITIONAL;е;говорю о буке
;NC_PLURAL;NGC_P1_NOMINATIVE;и;буки
;;NGC_P2_GENITIVE;ов;подарок для буков
;;NGC_P3_DATIVE;ам;подарок букам
;;NGC_P4_ACCUSATIVE;и;обвиняю буки
;;NGC_P5_INSTRUMENTAL;ами;говорю с буками
;;NGC_P6_PREPOSITIONAL;ах;говорю о буках
SECOND_MALE_IFORM_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;;рыбак
;;NGC_P2_GENITIVE;а;подарок для рыбака
;;NGC_P3_DATIVE;у;подарок рыбаку
;;NGC_P4_ACCUSATIVE;а;обвиняю рыбака
;;NGC_P5_INSTRUMENTAL;ом;говорю с рыбаком
;;NGC_P6_PREPOSITIONAL;е;говорю о рыбаке
;NC_PLURAL;NGC_P1_NOMINATIVE;и;рыбаки
;;NGC_P2_GENITIVE;ов;подарок для рыбаков
;;NGC_P3_DATIVE;ам;подарок рыбакам
;;NGC_P4_ACCUSATIVE;ов;обвиняю рыбаков
;;NGC_P5_INSTRUMENTAL;ами;говорю с рыбаками
;;NGC_P6_PREPOSITIONAL;ах;говорю о рыбаках
SECOND_MALE_UFORM_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;;зад
;;NGC_P2_GENITIVE;а;подарок для зада
;;NGC_P3_DATIVE;у;подарок заду
;;NGC_P4_ACCUSATIVE;;обвиняю зад
;;NGC_P5_INSTRUMENTAL;ом;говорю с задом
;;NGC_P6_PREPOSITIONAL;е;говорю о заде
;NC_PLURAL;NGC_P1_NOMINATIVE;ы;зады
;;NGC_P2_GENITIVE;ов;подарок для задов
;;NGC_P3_DATIVE;ам;подарок задам
;;NGC_P4_ACCUSATIVE;ы;обвиняю зады
;;NGC_P5_INSTRUMENTAL;ами;говорю с задами
;;NGC_P6_PREPOSITIONAL;ах;говорю о задах
SECOND_MALE_UFORM_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;;кит
;;NGC_P2_GENITIVE;а;подарок для кита
;;NGC_P3_DATIVE;у;подарок киту
;;NGC_P4_ACCUSATIVE;а;обвиняю кита
;;NGC_P5_INSTRUMENTAL;ом;говорю с китом
;;NGC_P6_PREPOSITIONAL;е;говорю о ките
;NC_PLURAL;NGC_P1_NOMINATIVE;ы;киты
;;NGC_P2_GENITIVE;ов;подарок для китов
;;NGC_P3_DATIVE;ам;подарок китам
;;NGC_P4_ACCUSATIVE;ов;обвиняю китов
;;NGC_P5_INSTRUMENTAL;ами;говорю с китами
;;NGC_P6_PREPOSITIONAL;ах;говорю о китах
SECOND_MALE_SSFORM_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ь;тополь
;;NGC_P2_GENITIVE;я;подарок для тополя
;;NGC_P3_DATIVE;ю;подарок тополю
;;NGC_P4_ACCUSATIVE;ь;обвиняю тополь
;;NGC_P5_INSTRUMENTAL;ем;говорю с тополем
;;NGC_P6_PREPOSITIONAL;е;говорю о тополе
;NC_PLURAL;NGC_P1_NOMINATIVE;и;тополи
;;NGC_P2_GENITIVE;ей;подарок для тополей
;;NGC_P3_DATIVE;ям;подарок тополям
;;NGC_P4_ACCUSATIVE;и;обвиняю тополи
;;NGC_P5_INSTRUMENTAL;ями;говорю с тополями
;;NGC_P6_PREPOSITIONAL;ях;говорю о тополях
SECOND_MALE_SSFORM_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ь;парень
;;NGC_P2_GENITIVE;я;подарок для парня
;;NGC_P3_DATIVE;ю;подарок парню
;;NGC_P4_ACCUSATIVE;я;обвиняю парня
;;NGC_P5_INSTRUMENTAL;ем;говорю с парнем
;;NGC_P6_PREPOSITIONAL;е;говорю о парне
;NC_PLURAL;NGC_P1_NOMINATIVE;и;парни
;;NGC_P2_GENITIVE;ей;подарок для парней
;;NGC_P3_DATIVE;ям;подарок парням
;;NGC_P4_ACCUSATIVE;ей;обвиняю парней
;;NGC_P5_INSTRUMENTAL;ями;говорю с парнями
;;NGC_P6_PREPOSITIONAL;ях;говорю о парнях
SECOND_NEUTRAL_E_FORM;NC_SINGULAR;NGC_P1_NOMINATIVE;е;поле
;;NGC_P2_GENITIVE;я;подарок для поля
;;NGC_P3_DATIVE;ю;подарок полю
;;NGC_P4_ACCUSATIVE;е;обвиняю поле
;;NGC_P5_INSTRUMENTAL;ем;говорю с полем
;;NGC_P6_PREPOSITIONAL;е;говорю о поле
;NC_PLURAL;NGC_P1_NOMINATIVE;я;поля
;;NGC_P2_GENITIVE;ей;подарок для полей
;;NGC_P3_DATIVE;ям;подарок полям
;;NGC_P4_ACCUSATIVE;я;обвиняю поля
;;NGC_P5_INSTRUMENTAL;ями;говорю с полями
;;NGC_P6_PREPOSITIONAL;ях;говорю о полях
SECOND_NEUTRAL_O_FORM;NC_SINGULAR;NGC_P1_NOMINATIVE;о;тело
;;NGC_P2_GENITIVE;а;подарок для тела
;;NGC_P3_DATIVE;у;подарок телу
;;NGC_P4_ACCUSATIVE;о;обвиняю тело
;;NGC_P5_INSTRUMENTAL;ом;говорю с телом
;;NGC_P6_PREPOSITIONAL;е;говорю о теле
;NC_PLURAL;NGC_P1_NOMINATIVE;а;тела
;;NGC_P2_GENITIVE;;подарок для тел
;;NGC_P3_DATIVE;ам;подарок телам
;;NGC_P4_ACCUSATIVE;а;обвиняю тела
;;NGC_P5_INSTRUMENTAL;ами;говорю с телами
;;NGC_P6_PREPOSITIONAL;ах;говорю о телах
THIRD_FORM_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ь;площадь
;;NGC_P2_GENITIVE;и;подарок для площади
;;NGC_P3_DATIVE;и;подарок площади
;;NGC_P4_ACCUSATIVE;ь;обвиняю площадь
;;NGC_P5_INSTRUMENTAL;ью;говорю с площадью
;;NGC_P6_PREPOSITIONAL;и;говорю о площади
;NC_PLURAL;NGC_P1_NOMINATIVE;и;площади
;;NGC_P2_GENITIVE;ей;подарок для площадей
;;NGC_P3_DATIVE;ям;подарок площадям
;;NGC_P4_ACCUSATIVE;и;обвиняю площади
;;NGC_P5_INSTRUMENTAL;ями;говорю с площадями
;;NGC_P6_PREPOSITIONAL;ях;говорю о площадях
THIRD_FORM_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ь;лошадь
;;NGC_P2_GENITIVE;и;подарок для лошади
;;NGC_P3_DATIVE;и;подарок лошади
;;NGC_P4_ACCUSATIVE;ь;обвиняю лошадь
;;NGC_P5_INSTRUMENTAL;ью;говорю с лошадью
;;NGC_P6_PREPOSITIONAL;и;говорю о лошади
;NC_PLURAL;NGC_P1_NOMINATIVE;и;лошади
;;NGC_P2_GENITIVE;ей;подарок для лошадей
;;NGC_P3_DATIVE;ям;подарок лошадям
;;NGC_P4_ACCUSATIVE;ей;обвиняю лошадей
;;NGC_P5_INSTRUMENTAL;ями;говорю с лошадями
;;NGC_P6_PREPOSITIONAL;ях;говорю о лошадях

1 FIRST_A_IFORM_SINGULAR Склонение NGC_P1_NOMINATIVE Род а Падеж рука Окончание Пример
2 FIRST_A_IFORM_INANIMATE NGC_P2_GENITIVE NC_SINGULAR и NGC_P1_NOMINATIVE подарок для руки а рука
3 NGC_P3_DATIVE е NGC_P2_GENITIVE подарок руке и подарок для руки
4 NGC_P4_ACCUSATIVE у NGC_P3_DATIVE обвиняю руку е подарок руке
5 NGC_P5_INSTRUMENTAL ой NGC_P4_ACCUSATIVE говорю с рукой у обвиняю руку
6 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о руке ой говорю с рукой
7 FIRST_A_IFORM_INANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL руки е говорю о руке
8 NGC_P2_GENITIVE NC_PLURAL NGC_P1_NOMINATIVE подарок для рук и руки
9 NGC_P3_DATIVE е NGC_P2_GENITIVE подарок рукам подарок для рук
10 NGC_P4_ACCUSATIVE и NGC_P3_DATIVE обвиняю руки е подарок рукам
11 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с руками и обвиняю руки
12 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о руках ами говорю с руками
13 FIRST_A_IFORM_ANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL бабушки ах говорю о руках
14 FIRST_A_IFORM_ANIMATE NGC_P2_GENITIVE NC_SINGULAR NGC_P1_NOMINATIVE подарок для бабушек а бабушка
15 NGC_P3_DATIVE е NGC_P2_GENITIVE подарок бабушкам и подарок для бабушки
16 NGC_P4_ACCUSATIVE NGC_P3_DATIVE обвиняю бабушек е подарок бабушке
17 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с бабушками у обвиняю бабушку
18 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о бабушках ой говорю с бабушкой
19 FIRST_A_UFORM_SINGULAR NGC_P1_NOMINATIVE а NGC_P6_PREPOSITIONAL лапа е говорю о бабушке
20 NGC_P2_GENITIVE NC_PLURAL ы NGC_P1_NOMINATIVE подарок для лапы и бабушки
21 NGC_P3_DATIVE е NGC_P2_GENITIVE подарок лапе подарок для бабушек
22 NGC_P4_ACCUSATIVE у NGC_P3_DATIVE обвиняю лапу е подарок бабушкам
23 NGC_P5_INSTRUMENTAL ой NGC_P4_ACCUSATIVE говорю с лапой обвиняю бабушек
24 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о лапе ами говорю с бабушками
25 FIRST_A_UFORM_INANIMATE_PLURAL NGC_P1_NOMINATIVE ы NGC_P6_PREPOSITIONAL лапы ах говорю о бабушках
26 FIRST_A_UFORM_INANIMATE NGC_P2_GENITIVE NC_SINGULAR NGC_P1_NOMINATIVE подарок для лап а лапа
27 NGC_P3_DATIVE ам NGC_P2_GENITIVE подарок лапам ы подарок для лапы
28 NGC_P4_ACCUSATIVE ы NGC_P3_DATIVE обвиняю лапы е подарок лапе
29 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с лапами у обвиняю лапу
30 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о лапах ой говорю с лапой
31 FIRST_A_UFORM_ANIMATE_PLURAL NGC_P1_NOMINATIVE ы NGC_P6_PREPOSITIONAL папы е говорю о лапе
32 NGC_P2_GENITIVE NC_PLURAL NGC_P1_NOMINATIVE подарок для пап ы лапы
33 NGC_P3_DATIVE ам NGC_P2_GENITIVE подарок папам подарок для лап
34 NGC_P4_ACCUSATIVE NGC_P3_DATIVE обвиняю пап ам подарок лапам
35 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с папами ы обвиняю лапы
36 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о папах ами говорю с лапами
37 FIRST_YA_FORM_SINGULAR NGC_P1_NOMINATIVE я NGC_P6_PREPOSITIONAL пуля ах говорю о лапах
38 FIRST_A_UFORM_ANIMATE NGC_P2_GENITIVE NC_SINGULAR и NGC_P1_NOMINATIVE подарок для пули а папа
39 NGC_P3_DATIVE е NGC_P2_GENITIVE подарок пуле ы подарок для папы
40 NGC_P4_ACCUSATIVE ю NGC_P3_DATIVE обвиняю пулю е подарок папе
41 NGC_P5_INSTRUMENTAL ей NGC_P4_ACCUSATIVE говорю с пулей у обвиняю папу
42 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о пуле ой говорю с папой
43 FIRST_YA_FORM_INANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL пули е говорю о папе
44 NGC_P2_GENITIVE NC_PLURAL ь NGC_P1_NOMINATIVE подарок для пуль ы папы
45 NGC_P3_DATIVE ям NGC_P2_GENITIVE подарок пулям подарок для пап
46 NGC_P4_ACCUSATIVE и NGC_P3_DATIVE обвиняю пули ам подарок папам
47 NGC_P5_INSTRUMENTAL ями NGC_P4_ACCUSATIVE говорю с пулями обвиняю пап
48 NGC_P6_PREPOSITIONAL ях NGC_P5_INSTRUMENTAL говорю о пулях ами говорю с папами
49 FIRST_YA_FORM_ANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL тети ах говорю о папах
50 FIRST_YA_FORM_INANIMATE NGC_P2_GENITIVE NC_SINGULAR ь NGC_P1_NOMINATIVE подарок для теть я пуля
51 NGC_P3_DATIVE ям NGC_P2_GENITIVE подарок тетям и подарок для пули
52 NGC_P4_ACCUSATIVE ь NGC_P3_DATIVE обвиняю теть е подарок пуле
53 NGC_P5_INSTRUMENTAL ями NGC_P4_ACCUSATIVE говорю с тетями ю обвиняю пулю
54 NGC_P6_PREPOSITIONAL ях NGC_P5_INSTRUMENTAL говорю о тетях ей говорю с пулей
55 SECOND_MALE_IFORM_INANIMATE_SINGULAR NGC_P1_NOMINATIVE NGC_P6_PREPOSITIONAL бук е говорю о пуле
56 NGC_P2_GENITIVE NC_PLURAL а NGC_P1_NOMINATIVE подарок для бука и пули
57 NGC_P3_DATIVE у NGC_P2_GENITIVE подарок буку ь подарок для пуль
58 NGC_P4_ACCUSATIVE NGC_P3_DATIVE обвиняю бук ям подарок пулям
59 NGC_P5_INSTRUMENTAL ом NGC_P4_ACCUSATIVE говорю с буком и обвиняю пули
60 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о буке ями говорю с пулями
61 SECOND_MALE_IFORM_INANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL буки ях говорю о пулях
62 FIRST_YA_FORM_ANIMATE NGC_P2_GENITIVE NC_SINGULAR ов NGC_P1_NOMINATIVE подарок для буков я тетя
63 NGC_P3_DATIVE у NGC_P2_GENITIVE подарок букам и подарок для тети
64 NGC_P4_ACCUSATIVE и NGC_P3_DATIVE обвиняю буки е подарок тете
65 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с буками ю обвиняю тетю
66 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о буках ей говорю с тетей
67 SECOND_MALE_IFORM_ANIMATE_SINGULAR NGC_P1_NOMINATIVE NGC_P6_PREPOSITIONAL рыбак е говорю о тете
68 NGC_P2_GENITIVE NC_PLURAL а NGC_P1_NOMINATIVE подарок для рыбака и тети
69 NGC_P3_DATIVE у NGC_P2_GENITIVE подарок рыбаку ь подарок для теть
70 NGC_P4_ACCUSATIVE а NGC_P3_DATIVE обвиняю рыбака ям подарок тетям
71 NGC_P5_INSTRUMENTAL ом NGC_P4_ACCUSATIVE говорю с рыбаком ь обвиняю теть
72 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о рыбаке ями говорю с тетями
73 SECOND_MALE_IFORM_ANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL рыбаки ях говорю о тетях
74 SECOND_MALE_IFORM_INANIMATE NGC_P2_GENITIVE NC_SINGULAR ов NGC_P1_NOMINATIVE подарок для рыбаков бук
75 NGC_P3_DATIVE ам NGC_P2_GENITIVE подарок рыбакам а подарок для бука
76 NGC_P4_ACCUSATIVE ов NGC_P3_DATIVE обвиняю рыбаков у подарок буку
77 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с рыбаками обвиняю бук
78 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о рыбаках ом говорю с буком
79 SECOND_MALE_UFORM_INANIMATE_SINGULAR NGC_P1_NOMINATIVE NGC_P6_PREPOSITIONAL зад е говорю о буке
80 NGC_P2_GENITIVE NC_PLURAL а NGC_P1_NOMINATIVE подарок для зада и буки
81 NGC_P3_DATIVE у NGC_P2_GENITIVE подарок заду ов подарок для буков
82 NGC_P4_ACCUSATIVE NGC_P3_DATIVE обвиняю зад ам подарок букам
83 NGC_P5_INSTRUMENTAL ом NGC_P4_ACCUSATIVE говорю с задом и обвиняю буки
84 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о заде ами говорю с буками
85 SECOND_MALE_UFORM_INANIMATE_PLURAL NGC_P1_NOMINATIVE ы NGC_P6_PREPOSITIONAL зады ах говорю о буках
86 SECOND_MALE_IFORM_ANIMATE NGC_P2_GENITIVE NC_SINGULAR ов NGC_P1_NOMINATIVE подарок для задов рыбак
87 NGC_P3_DATIVE ам NGC_P2_GENITIVE подарок задам а подарок для рыбака
88 NGC_P4_ACCUSATIVE ы NGC_P3_DATIVE обвиняю зады у подарок рыбаку
89 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с задами а обвиняю рыбака
90 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о задах ом говорю с рыбаком
91 SECOND_MALE_UFORM_ANIMATE_SINGULAR NGC_P1_NOMINATIVE NGC_P6_PREPOSITIONAL кит е говорю о рыбаке
92 NGC_P2_GENITIVE NC_PLURAL а NGC_P1_NOMINATIVE подарок для кита и рыбаки
93 NGC_P3_DATIVE у NGC_P2_GENITIVE подарок киту ов подарок для рыбаков
94 NGC_P4_ACCUSATIVE а NGC_P3_DATIVE обвиняю кита ам подарок рыбакам
95 NGC_P5_INSTRUMENTAL ом NGC_P4_ACCUSATIVE говорю с китом ов обвиняю рыбаков
96 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о ките ами говорю с рыбаками
97 SECOND_MALE_UFORM_ANIMATE_PLURAL NGC_P1_NOMINATIVE ы NGC_P6_PREPOSITIONAL киты ах говорю о рыбаках
98 SECOND_MALE_UFORM_INANIMATE NGC_P2_GENITIVE NC_SINGULAR ов NGC_P1_NOMINATIVE подарок для китов зад
99 NGC_P3_DATIVE ам NGC_P2_GENITIVE подарок китам а подарок для зада
100 NGC_P4_ACCUSATIVE ов NGC_P3_DATIVE обвиняю китов у подарок заду
101 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с китами обвиняю зад
102 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о китах ом говорю с задом
103 SECOND_MALE_SSFORM_INANIMATE_SINGULAR NGC_P1_NOMINATIVE ь NGC_P6_PREPOSITIONAL тополь е говорю о заде
104 NGC_P2_GENITIVE NC_PLURAL я NGC_P1_NOMINATIVE подарок для тополя ы зады
105 NGC_P3_DATIVE ю NGC_P2_GENITIVE подарок тополю ов подарок для задов
106 NGC_P4_ACCUSATIVE ь NGC_P3_DATIVE обвиняю тополь ам подарок задам
107 NGC_P5_INSTRUMENTAL ем NGC_P4_ACCUSATIVE говорю с тополем ы обвиняю зады
108 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о тополе ами говорю с задами
109 SECOND_MALE_SSFORM_INANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL тополи ах говорю о задах
110 SECOND_MALE_UFORM_ANIMATE NGC_P2_GENITIVE NC_SINGULAR ей NGC_P1_NOMINATIVE подарок для тополей кит
111 NGC_P3_DATIVE ям NGC_P2_GENITIVE подарок тополям а подарок для кита
112 NGC_P4_ACCUSATIVE и NGC_P3_DATIVE обвиняю тополи у подарок киту
113 NGC_P5_INSTRUMENTAL ями NGC_P4_ACCUSATIVE говорю с тополями а обвиняю кита
114 NGC_P6_PREPOSITIONAL ях NGC_P5_INSTRUMENTAL говорю о тополях ом говорю с китом
115 SECOND_MALE_SSFORM_ANIMATE_SINGULAR NGC_P1_NOMINATIVE ь NGC_P6_PREPOSITIONAL парень е говорю о ките
116 NGC_P2_GENITIVE NC_PLURAL я NGC_P1_NOMINATIVE подарок для парня ы киты
117 NGC_P3_DATIVE ю NGC_P2_GENITIVE подарок парню ов подарок для китов
118 NGC_P4_ACCUSATIVE я NGC_P3_DATIVE обвиняю парня ам подарок китам
119 NGC_P5_INSTRUMENTAL ем NGC_P4_ACCUSATIVE говорю с парнем ов обвиняю китов
120 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о парне ами говорю с китами
121 SECOND_MALE_SSFORM_ANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL парни ах говорю о китах
122 SECOND_MALE_SSFORM_INANIMATE NGC_P2_GENITIVE NC_SINGULAR ей NGC_P1_NOMINATIVE подарок для парней ь тополь
123 NGC_P3_DATIVE ям NGC_P2_GENITIVE подарок парням я подарок для тополя
124 NGC_P4_ACCUSATIVE ей NGC_P3_DATIVE обвиняю парней ю подарок тополю
125 NGC_P5_INSTRUMENTAL ями NGC_P4_ACCUSATIVE говорю с парнями ь обвиняю тополь
126 NGC_P6_PREPOSITIONAL ях NGC_P5_INSTRUMENTAL говорю о парнях ем говорю с тополем
127 SECOND_NEUTRAL_E_FORM_SINGULAR NGC_P1_NOMINATIVE е NGC_P6_PREPOSITIONAL поле е говорю о тополе
128 NGC_P2_GENITIVE NC_PLURAL я NGC_P1_NOMINATIVE подарок для поля и тополи
129 NGC_P3_DATIVE ю NGC_P2_GENITIVE подарок полю ей подарок для тополей
130 NGC_P4_ACCUSATIVE е NGC_P3_DATIVE обвиняю поле ям подарок тополям
131 NGC_P5_INSTRUMENTAL ем NGC_P4_ACCUSATIVE говорю с полем и обвиняю тополи
132 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о поле ями говорю с тополями
133 SECOND_NEUTRAL_E_FORM_PLURAL NGC_P1_NOMINATIVE я NGC_P6_PREPOSITIONAL поля ях говорю о тополях
134 SECOND_MALE_SSFORM_ANIMATE NGC_P2_GENITIVE NC_SINGULAR ей NGC_P1_NOMINATIVE подарок для полей ь парень
135 NGC_P3_DATIVE ям NGC_P2_GENITIVE подарок полям я подарок для парня
136 NGC_P4_ACCUSATIVE я NGC_P3_DATIVE обвиняю поля ю подарок парню
137 NGC_P5_INSTRUMENTAL ями NGC_P4_ACCUSATIVE говорю с полями я обвиняю парня
138 NGC_P6_PREPOSITIONAL ях NGC_P5_INSTRUMENTAL говорю о полях ем говорю с парнем
139 SECOND_NEUTRAL_O_FORM_SINGULAR NGC_P1_NOMINATIVE о NGC_P6_PREPOSITIONAL тело е говорю о парне
140 NGC_P2_GENITIVE NC_PLURAL а NGC_P1_NOMINATIVE подарок для тела и парни
141 NGC_P3_DATIVE у NGC_P2_GENITIVE подарок телу ей подарок для парней
142 NGC_P4_ACCUSATIVE о NGC_P3_DATIVE обвиняю тело ям подарок парням
143 NGC_P5_INSTRUMENTAL ом NGC_P4_ACCUSATIVE говорю с телом ей обвиняю парней
144 NGC_P6_PREPOSITIONAL е NGC_P5_INSTRUMENTAL говорю о теле ями говорю с парнями
145 SECOND_NEUTRAL_O_FORM_PLURAL NGC_P1_NOMINATIVE а NGC_P6_PREPOSITIONAL тела ях говорю о парнях
146 SECOND_NEUTRAL_E_FORM NGC_P2_GENITIVE NC_SINGULAR NGC_P1_NOMINATIVE подарок для тел е поле
147 NGC_P3_DATIVE ам NGC_P2_GENITIVE подарок телам я подарок для поля
148 NGC_P4_ACCUSATIVE а NGC_P3_DATIVE обвиняю тела ю подарок полю
149 NGC_P5_INSTRUMENTAL ами NGC_P4_ACCUSATIVE говорю с телами е обвиняю поле
150 NGC_P6_PREPOSITIONAL ах NGC_P5_INSTRUMENTAL говорю о телах ем говорю с полем
151 THIRD_FORM_SINGULAR NGC_P1_NOMINATIVE ь NGC_P6_PREPOSITIONAL площадь е говорю о поле
152 NGC_P2_GENITIVE NC_PLURAL и NGC_P1_NOMINATIVE подарок для площади я поля
153 NGC_P3_DATIVE и NGC_P2_GENITIVE подарок площади ей подарок для полей
154 NGC_P4_ACCUSATIVE ь NGC_P3_DATIVE обвиняю площадь ям подарок полям
155 NGC_P5_INSTRUMENTAL ью NGC_P4_ACCUSATIVE говорю с площадью я обвиняю поля
156 NGC_P6_PREPOSITIONAL и NGC_P5_INSTRUMENTAL говорю о площади ями говорю с полями
157 THIRD_FORM_INANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL площади ях говорю о полях
158 SECOND_NEUTRAL_O_FORM NGC_P2_GENITIVE NC_SINGULAR ей NGC_P1_NOMINATIVE подарок для площадей о тело
159 NGC_P3_DATIVE ям NGC_P2_GENITIVE подарок площадям а подарок для тела
160 NGC_P4_ACCUSATIVE и NGC_P3_DATIVE обвиняю площади у подарок телу
161 NGC_P5_INSTRUMENTAL ями NGC_P4_ACCUSATIVE говорю с площадями о обвиняю тело
162 NGC_P6_PREPOSITIONAL ях NGC_P5_INSTRUMENTAL говорю о площадях ом говорю с телом
163 THIRD_FORM_ANIMATE_PLURAL NGC_P1_NOMINATIVE и NGC_P6_PREPOSITIONAL лошади е говорю о теле
164 NGC_P2_GENITIVE NC_PLURAL ей NGC_P1_NOMINATIVE подарок для лошадей а тела
165 NGC_P3_DATIVE ям NGC_P2_GENITIVE подарок лошадям подарок для тел
166 NGC_P4_ACCUSATIVE ей NGC_P3_DATIVE обвиняю лошадей ам подарок телам
167 NGC_P5_INSTRUMENTAL ями NGC_P4_ACCUSATIVE говорю с лошадями а обвиняю тела
168 NGC_P6_PREPOSITIONAL ях NGC_P5_INSTRUMENTAL говорю о лошадях ами говорю с телами
169 NGC_P6_PREPOSITIONAL ах говорю о телах
170 THIRD_FORM_INANIMATE NC_SINGULAR NGC_P1_NOMINATIVE ь площадь
171 NGC_P2_GENITIVE и подарок для площади
172 NGC_P3_DATIVE и подарок площади
173 NGC_P4_ACCUSATIVE ь обвиняю площадь
174 NGC_P5_INSTRUMENTAL ью говорю с площадью
175 NGC_P6_PREPOSITIONAL и говорю о площади
176 NC_PLURAL NGC_P1_NOMINATIVE и площади
177 NGC_P2_GENITIVE ей подарок для площадей
178 NGC_P3_DATIVE ям подарок площадям
179 NGC_P4_ACCUSATIVE и обвиняю площади
180 NGC_P5_INSTRUMENTAL ями говорю с площадями
181 NGC_P6_PREPOSITIONAL ях говорю о площадях
182 THIRD_FORM_ANIMATE NC_SINGULAR NGC_P1_NOMINATIVE ь лошадь
183 NGC_P2_GENITIVE и подарок для лошади
184 NGC_P3_DATIVE и подарок лошади
185 NGC_P4_ACCUSATIVE ь обвиняю лошадь
186 NGC_P5_INSTRUMENTAL ью говорю с лошадью
187 NGC_P6_PREPOSITIONAL и говорю о лошади
188 NC_PLURAL NGC_P1_NOMINATIVE и лошади
189 NGC_P2_GENITIVE ей подарок для лошадей
190 NGC_P3_DATIVE ям подарок лошадям
191 NGC_P4_ACCUSATIVE ей обвиняю лошадей
192 NGC_P5_INSTRUMENTAL ями говорю с лошадями
193 NGC_P6_PREPOSITIONAL ях говорю о лошадях

Binary file not shown.

View File

@ -159,7 +159,8 @@ namespace http {
nounTree.put(L"id", id);
nounTree.put(L"grammaticalCase", NounGrammaticalCaseToWString(nounStruct.nounGrammaticalCase));
nounTree.put(L"animated", nounStruct.animated);
nounTree.put(L"count", NounCountToWString(nounStruct.nounCount));
nounTree.put(L"canBeAnimate", nounStruct.nounRecord.canBeAnimate);
nounTree.put(L"canBeInanimate", nounStruct.nounRecord.canBeInanimate);
nounTree.put(L"gender", nounStruct.nounRecord.gender);

View File

@ -12,7 +12,8 @@ int main()
LoadNounDeclencionCaseTable();
LoadFrequentWordSet();
RecognizeNoun(L"стульями");
//RecognizeNoun(L"стульями");
//Косяк: "вечер"
try
{

View File

@ -18,6 +18,8 @@ NounRecord::NounRecord()
, haveMultipleForm(false)
, haveStandardMultipleForm(false)
, haveStandardMultipleFormWithMissingLastVowel(false)
, haveStandardMultipleFormEnding(false)
, haveAlternativeMultipleFormEnding(false)
, canBeAnimate(false)
, canBeInanimate(false)
{
@ -52,12 +54,15 @@ NounRecord::NounRecord(std::wstring line)
haveStandardMultipleForm = lineArr[5] == L"1" ? true : false;
haveStandardMultipleFormWithMissingLastVowel = lineArr[6] == L"1" ? true : false;
specialMultipleForm = lineArr[7];
canBeAnimate = lineArr[8] == L"1" ? true : false;
canBeInanimate = lineArr[9] == L"1" ? true : false;
haveStandardMultipleFormEnding = lineArr[7] == L"1" ? true : false;
haveAlternativeMultipleFormEnding = lineArr[8] == L"1" ? true : false;
specialMultipleForm = lineArr[9];
canBeAnimate = lineArr[10] == L"1" ? true : false;
canBeInanimate = lineArr[11] == L"1" ? true : false;
}
@ -66,124 +71,107 @@ NounRecord::NounRecord(std::wstring line)
NounDeclencion WStringToNounDeclencion(std::wstring str)
{
if (str == L"FIRST_A_IFORM_SINGULAR")
if (str == L"FIRST_A_IFORM_INANIMATE")
{
return FIRST_A_IFORM_SINGULAR;
return FIRST_A_IFORM_INANIMATE;
}
if (str == L"FIRST_A_IFORM_INANIMATE_PLURAL")
if (str == L"FIRST_A_IFORM_ANIMATE")
{
return FIRST_A_IFORM_INANIMATE_PLURAL;
return FIRST_A_IFORM_INANIMATE;
}
if (str == L"FIRST_A_IFORM_ANIMATE_PLURAL")
if (str == L"FIRST_A_UFORM_INANIMATE")
{
return FIRST_A_IFORM_ANIMATE_PLURAL;
return FIRST_A_UFORM_INANIMATE;
}
if (str == L"FIRST_A_UFORM_SINGULAR")
if (str == L"FIRST_A_UFORM_ANIMATE")
{
return FIRST_A_UFORM_SINGULAR;
return FIRST_A_UFORM_ANIMATE;
}
if (str == L"FIRST_A_UFORM_INANIMATE_PLURAL")
if (str == L"FIRST_YA_FORM_INANIMATE")
{
return FIRST_A_UFORM_INANIMATE_PLURAL;
return FIRST_YA_FORM_INANIMATE;
}
if (str == L"FIRST_A_UFORM_ANIMATE_PLURAL")
if (str == L"FIRST_YA_FORM_ANIMATE")
{
return FIRST_A_UFORM_ANIMATE_PLURAL;
return FIRST_YA_FORM_ANIMATE;
}
if (str == L"FIRST_YA_FORM_SINGULAR")
if (str == L"SECOND_MALE_IFORM_INANIMATE")
{
return FIRST_YA_FORM_SINGULAR;
return SECOND_MALE_IFORM_INANIMATE;
}
if (str == L"FIRST_YA_FORM_INANIMATE_PLURAL")
if (str == L"SECOND_MALE_IFORM_ANIMATE")
{
return FIRST_YA_FORM_INANIMATE_PLURAL;
return SECOND_MALE_IFORM_ANIMATE;
}
if (str == L"FIRST_YA_FORM_ANIMATE_PLURAL")
if (str == L"SECOND_MALE_UFORM_INANIMATE")
{
return FIRST_YA_FORM_ANIMATE_PLURAL;
return SECOND_MALE_UFORM_INANIMATE;
}
if (str == L"SECOND_MALE_IFORM_INANIMATE_SINGULAR")
if (str == L"SECOND_MALE_UFORM_ANIMATE")
{
return SECOND_MALE_IFORM_INANIMATE_SINGULAR;
return SECOND_MALE_UFORM_ANIMATE;
}
if (str == L"SECOND_MALE_IFORM_INANIMATE_PLURAL")
if (str == L"SECOND_MALE_SSFORM_INANIMATE")
{
return SECOND_MALE_IFORM_INANIMATE_PLURAL;
return SECOND_MALE_SSFORM_INANIMATE;
}
if (str == L"SECOND_MALE_IFORM_ANIMATE_SINGULAR")
if (str == L"SECOND_MALE_SSFORM_ANIMATE")
{
return SECOND_MALE_IFORM_ANIMATE_SINGULAR;
return SECOND_MALE_SSFORM_ANIMATE;
}
if (str == L"SECOND_MALE_IFORM_ANIMATE_PLURAL")
if (str == L"SECOND_NEUTRAL_E_FORM")
{
return SECOND_MALE_IFORM_ANIMATE_PLURAL;
return SECOND_NEUTRAL_E_FORM;
}
if (str == L"SECOND_MALE_UFORM_INANIMATE_SINGULAR")
if (str == L"SECOND_NEUTRAL_O_FORM")
{
return SECOND_MALE_UFORM_INANIMATE_SINGULAR;
return SECOND_NEUTRAL_O_FORM;
}
if (str == L"SECOND_MALE_UFORM_INANIMATE_PLURAL")
if (str == L"THIRD_FORM_INANIMATE")
{
return SECOND_MALE_UFORM_INANIMATE_PLURAL;
return THIRD_FORM_INANIMATE;
}
if (str == L"SECOND_MALE_UFORM_ANIMATE_SINGULAR")
if (str == L"THIRD_FORM_ANIMATE")
{
return SECOND_MALE_UFORM_ANIMATE_SINGULAR;
}
if (str == L"SECOND_MALE_UFORM_ANIMATE_PLURAL")
{
return SECOND_MALE_UFORM_ANIMATE_PLURAL;
}
if (str == L"SECOND_MALE_SSFORM_INANIMATE_SINGULAR")
{
return SECOND_MALE_SSFORM_INANIMATE_SINGULAR;
}
if (str == L"SECOND_MALE_SSFORM_INANIMATE_PLURAL")
{
return SECOND_MALE_SSFORM_INANIMATE_PLURAL;
}
if (str == L"SECOND_MALE_SSFORM_ANIMATE_SINGULAR")
{
return SECOND_MALE_SSFORM_ANIMATE_SINGULAR;
}
if (str == L"SECOND_MALE_SSFORM_ANIMATE_PLURAL")
{
return SECOND_MALE_SSFORM_ANIMATE_PLURAL;
}
if (str == L"SECOND_NEUTRAL_E_FORM_SINGULAR")
{
return SECOND_NEUTRAL_E_FORM_SINGULAR;
}
if (str == L"SECOND_NEUTRAL_E_FORM_PLURAL")
{
return SECOND_NEUTRAL_E_FORM_PLURAL;
}
if (str == L"SECOND_NEUTRAL_O_FORM_SINGULAR")
{
return SECOND_NEUTRAL_O_FORM_SINGULAR;
}
if (str == L"SECOND_NEUTRAL_O_FORM_PLURAL")
{
return SECOND_NEUTRAL_O_FORM_PLURAL;
}
if (str == L"THIRD_FORM_SINGULAR")
{
return THIRD_FORM_SINGULAR;
}
if (str == L"THIRD_FORM_INANIMATE_PLURAL")
{
return THIRD_FORM_INANIMATE_PLURAL;
}
if (str == L"THIRD_FORM_ANIMATE_PLURAL")
{
return THIRD_FORM_ANIMATE_PLURAL;
return THIRD_FORM_ANIMATE;
}
std::cout << "Error in WStringToNounDeclencion!" << std::endl;
return FIRST_A_IFORM_SINGULAR;
return FIRST_A_IFORM_INANIMATE;
}
NounCount WStringToNounCount(std::wstring str)
{
if (str == L"NC_SINGULAR")
{
return NC_SINGULAR;
}
if (str == L"NC_PLURAL")
{
return NC_PLURAL;
}
std::cout << "Error in WStringToNounCount!" << std::endl;
return NC_SINGULAR;
}
std::wstring NounCountToWString(NounCount nounCount)
{
if (nounCount == NC_SINGULAR)
{
return L"NC_SINGULAR";
}
if (nounCount == NC_PLURAL)
{
return L"NC_PLURAL";
}
std::cout << "Error in NounCountToWString!" << std::endl;
return L"";
}
std::wstring NounGrammaticalCaseToWString(NounGrammaticalCase nounGrammaticalCase)
{
@ -351,9 +339,9 @@ bool charIsVowel(wchar_t c)
}
std::set<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivisionSet(std::wstring noun)
std::set<NounEndingDivision> getPossibleNounEndingDivisionSet(std::wstring noun)
{
std::set<std::pair<std::wstring, std::wstring>> result;
std::set<NounEndingDivision> result;
auto allNounEndingArr = GetAllNounEndingArr();
@ -365,8 +353,20 @@ std::set<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivisionSet
if (charIsConsolant(nounBase[nounBase.size() - 1]) || nounBase[nounBase.size() - 1] == L'ь' || nounBase[nounBase.size() - 1] == L'ъ')
{
result.insert({ nounBase, ending});
result.insert({ nounBase, ending, NounEndingDivision::DC_COMMON });
}
//Check missed vowel (simple case)
if (charIsConsolant(nounBase[nounBase.size() - 1]) && charIsConsolant(nounBase[nounBase.size() - 2]))
{
result.insert({ nounBase, ending, NounEndingDivision::DC_LOST_VOWEL_O });
}
if (charIsConsolant(nounBase[nounBase.size() - 1]) && nounBase[nounBase.size() - 2] == L'ь')
{
result.insert({ nounBase, ending, NounEndingDivision::DC_LOST_VOWEL_E });
}
}
}
@ -381,11 +381,11 @@ std::vector<NounTuple> GetPossibleNounTupleArr(std::wstring nounEnding)
for (auto& noun : nounDeclencionCaseTable)
{
for (int i = 0; i < 6; i++)
for (int i = 0; i < NGC_SIZE * NC_SIZE; i++)
{
if (noun.grammaticalCaseMap[i].second == nounEnding)
if (noun.grammaticalCaseTable[i].ending == nounEnding)
{
result.push_back(NounTuple{ noun.nounDeclencion, noun.grammaticalCaseMap[i].first });
result.push_back(NounTuple{ noun.nounDeclencion, noun.grammaticalCaseTable[i].count, noun.grammaticalCaseTable[i].grammaticalCase });
}
}
@ -394,119 +394,6 @@ std::vector<NounTuple> GetPossibleNounTupleArr(std::wstring nounEnding)
return result;
}
bool NounDeclencionIsPlural(NounDeclencion nounDeclencion)
{
switch (nounDeclencion)
{
case FIRST_A_IFORM_SINGULAR:
case FIRST_A_UFORM_SINGULAR:
case FIRST_YA_FORM_SINGULAR:
case SECOND_MALE_IFORM_INANIMATE_SINGULAR:
case SECOND_MALE_IFORM_ANIMATE_SINGULAR:
case SECOND_MALE_UFORM_INANIMATE_SINGULAR:
case SECOND_MALE_UFORM_ANIMATE_SINGULAR:
case SECOND_MALE_SSFORM_INANIMATE_SINGULAR:
case SECOND_MALE_SSFORM_ANIMATE_SINGULAR:
case SECOND_NEUTRAL_E_FORM_SINGULAR:
case SECOND_NEUTRAL_O_FORM_SINGULAR:
case THIRD_FORM_SINGULAR:
return false;
break;
default:
return true;
break;
}
}
NounDeclencion ConvertToSingularIfNeeded(NounDeclencion nounDeclencion)
{
switch (nounDeclencion)
{
case FIRST_A_IFORM_SINGULAR:
case FIRST_A_IFORM_INANIMATE_PLURAL:
case FIRST_A_IFORM_ANIMATE_PLURAL:
return FIRST_A_IFORM_SINGULAR;
break;
case FIRST_A_UFORM_SINGULAR:
case FIRST_A_UFORM_INANIMATE_PLURAL:
case FIRST_A_UFORM_ANIMATE_PLURAL:
return FIRST_A_UFORM_SINGULAR;
break;
case FIRST_YA_FORM_SINGULAR:
case FIRST_YA_FORM_INANIMATE_PLURAL:
case FIRST_YA_FORM_ANIMATE_PLURAL:
return FIRST_YA_FORM_SINGULAR;
break;
case SECOND_MALE_IFORM_INANIMATE_SINGULAR:
case SECOND_MALE_IFORM_INANIMATE_PLURAL:
return SECOND_MALE_IFORM_INANIMATE_SINGULAR;
break;
case SECOND_MALE_IFORM_ANIMATE_SINGULAR:
case SECOND_MALE_IFORM_ANIMATE_PLURAL:
return SECOND_MALE_IFORM_ANIMATE_SINGULAR;
break;
case SECOND_MALE_UFORM_INANIMATE_SINGULAR:
case SECOND_MALE_UFORM_INANIMATE_PLURAL:
return SECOND_MALE_UFORM_INANIMATE_SINGULAR;
break;
case SECOND_MALE_UFORM_ANIMATE_SINGULAR:
case SECOND_MALE_UFORM_ANIMATE_PLURAL:
return SECOND_MALE_UFORM_ANIMATE_SINGULAR;
break;
case SECOND_MALE_SSFORM_INANIMATE_SINGULAR:
case SECOND_MALE_SSFORM_INANIMATE_PLURAL:
return SECOND_MALE_SSFORM_INANIMATE_SINGULAR;
break;
case SECOND_MALE_SSFORM_ANIMATE_SINGULAR:
case SECOND_MALE_SSFORM_ANIMATE_PLURAL:
return SECOND_MALE_SSFORM_ANIMATE_SINGULAR;
break;
case SECOND_NEUTRAL_E_FORM_SINGULAR:
case SECOND_NEUTRAL_E_FORM_PLURAL:
return SECOND_NEUTRAL_E_FORM_SINGULAR;
break;
case SECOND_NEUTRAL_O_FORM_SINGULAR:
case SECOND_NEUTRAL_O_FORM_PLURAL:
return SECOND_NEUTRAL_O_FORM_SINGULAR;
break;
case THIRD_FORM_SINGULAR:
case THIRD_FORM_INANIMATE_PLURAL:
case THIRD_FORM_ANIMATE_PLURAL:
return THIRD_FORM_SINGULAR;
break;
default:
std::cout << "Error in ConvertToSingularIfNeeded" << std::endl;
return FIRST_A_IFORM_SINGULAR;
break;
}
}
std::vector<NounTuple> FilterNounTupleArrByNounDeclentionSet(std::vector<NounTuple> nounTupleArr, std::set<NounDeclencion> filter)
{
std::vector<NounTuple> result;
@ -523,26 +410,26 @@ std::vector<NounTuple> FilterNounTupleArrByNounDeclentionSet(std::vector<NounTup
}
std::wstring GetNounNoninativeSingular(std::wstring nounBase, NounDeclencion nounDeclencion)
std::wstring GetNounNoninative(std::wstring nounBase, NounDeclencion nounDeclencion, NounCount nounCount)
{
NounDeclencion nounDeclencionSingular = ConvertToSingularIfNeeded(nounDeclencion);
NounDeclencionCaseTableRecord nounDeclencionCaseTableRecord = nounDeclencionCaseTable[static_cast<int>(nounDeclencion)];
//Get nominative form of this declention
std::wstring nounEndling = nounDeclencionCaseTable[static_cast<int>(nounDeclencionSingular)].grammaticalCaseMap[static_cast<int>(NGC_P1_NOMINATIVE)].second;
for (auto& grammaticalTableRecord : nounDeclencionCaseTableRecord.grammaticalCaseTable)
{
if (grammaticalTableRecord.grammaticalCase == NGC_P1_NOMINATIVE && grammaticalTableRecord.count == nounCount)
{
return nounBase + grammaticalTableRecord.ending;
}
}
return nounBase + nounEndling;
}
std::cout << "Error in GetNounNoninative" << std::endl;
std::wstring GetNounNoninative(std::wstring nounBase, NounDeclencion nounDeclencion)
{
std::wstring nounEndling = nounDeclencionCaseTable[static_cast<int>(nounDeclencion)].grammaticalCaseMap[static_cast<int>(NGC_P1_NOMINATIVE)].second;
return nounBase + nounEndling;
return L"";
}
std::wstring i_form_consolants = L"гкжшчщ";
std::wstring u_form_consolants = L"бпдтвфзснмлр";
std::wstring u_form_consolants = L"бпдтвфзснмлрц";
wchar_t GetLastChar(const NounRecord& nounRecord)
{
@ -565,51 +452,51 @@ bool charIsUFormConsolant(wchar_t c)
}
bool FirstAIFormSingularCondition(const NounRecord& nounRecord)
bool FirstAIFormSingularCondition(const NounRecord& nounRecord) //Same for both animate and inanimate
{
return nounRecord.haveSingleForm && (GetLastChar(nounRecord) == L'а' && charIsIFormConsolant(GetPrevLastChar(nounRecord)));
}
bool FirstAIFormInanimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.canBeInanimate && (GetLastChar(nounRecord) == L'а' && charIsIFormConsolant(GetPrevLastChar(nounRecord)));
return nounRecord.haveMultipleForm && nounRecord.canBeInanimate && (GetLastChar(nounRecord) == L'а' && charIsIFormConsolant(GetPrevLastChar(nounRecord)));
}
bool FirstAIFormAnimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.canBeAnimate && (GetLastChar(nounRecord) == L'а' && charIsIFormConsolant(GetPrevLastChar(nounRecord)));
return nounRecord.haveMultipleForm && nounRecord.canBeAnimate && (GetLastChar(nounRecord) == L'а' && charIsIFormConsolant(GetPrevLastChar(nounRecord)));
}
bool FirstAUFormSingularCondition(const NounRecord& nounRecord)
bool FirstAUFormSingularCondition(const NounRecord& nounRecord) //Same for both animate and inanimate
{
return nounRecord.haveSingleForm && (GetLastChar(nounRecord) == L'а' && charIsUFormConsolant(GetPrevLastChar(nounRecord)));
}
bool FirstAUFormInanimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.canBeInanimate && (GetLastChar(nounRecord) == L'а' && charIsUFormConsolant(GetPrevLastChar(nounRecord)));
return nounRecord.haveMultipleForm && nounRecord.canBeInanimate && (GetLastChar(nounRecord) == L'а' && charIsUFormConsolant(GetPrevLastChar(nounRecord)));
}
bool FirstAUFormAnimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.canBeAnimate && (GetLastChar(nounRecord) == L'а' && charIsUFormConsolant(GetPrevLastChar(nounRecord)));
return nounRecord.haveMultipleForm && nounRecord.canBeAnimate && (GetLastChar(nounRecord) == L'а' && charIsUFormConsolant(GetPrevLastChar(nounRecord)));
}
bool FirstYaFormSingularCondition(const NounRecord& nounRecord)
bool FirstYaFormSingularCondition(const NounRecord& nounRecord) //Same for both animate and inanimate
{
return nounRecord.haveSingleForm && (GetLastChar(nounRecord) == L'я');
}
bool FirstYaFormInanimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.canBeInanimate && (GetLastChar(nounRecord) == L'я');
return nounRecord.haveMultipleForm && nounRecord.canBeInanimate && (GetLastChar(nounRecord) == L'я');
}
bool FirstYaFormAnimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.canBeAnimate && (GetLastChar(nounRecord) == L'я');
return nounRecord.haveMultipleForm && nounRecord.canBeAnimate && (GetLastChar(nounRecord) == L'я');
}
@ -622,7 +509,7 @@ bool SecondMaleIFormInanimateSingularCondition(const NounRecord& nounRecord)
bool SecondMaleIFormInanimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeInanimate && charIsIFormConsolant(GetLastChar(nounRecord));
return nounRecord.haveMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeInanimate && charIsIFormConsolant(GetLastChar(nounRecord));
}
@ -633,7 +520,7 @@ bool SecondMaleIFormAnimateSingularCondition(const NounRecord& nounRecord)
bool SecondMaleIFormAnimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeAnimate && charIsIFormConsolant(GetLastChar(nounRecord));
return nounRecord.haveMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeAnimate && charIsIFormConsolant(GetLastChar(nounRecord));
}
@ -644,7 +531,7 @@ bool SecondMaleUFormInanimateSingularCondition(const NounRecord& nounRecord)
bool SecondMaleUFormInanimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeInanimate && charIsUFormConsolant(GetLastChar(nounRecord));
return nounRecord.haveMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeInanimate && charIsUFormConsolant(GetLastChar(nounRecord));
}
@ -655,7 +542,7 @@ bool SecondMaleUFormAnimateSingularCondition(const NounRecord& nounRecord)
bool SecondMaleUFormAnimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeAnimate && charIsUFormConsolant(GetLastChar(nounRecord));
return nounRecord.haveMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeAnimate && charIsUFormConsolant(GetLastChar(nounRecord));
}
@ -666,7 +553,7 @@ bool SecondMaleSSFormInanimateSingularCondition(const NounRecord& nounRecord)
bool SecondMaleSSFormInanimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeInanimate && GetLastChar(nounRecord) == L'ь';
return nounRecord.haveMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeInanimate && GetLastChar(nounRecord) == L'ь';
}
@ -677,7 +564,7 @@ bool SecondMaleSSFormAnimateSingularCondition(const NounRecord& nounRecord)
bool SecondMaleSSFormAnimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeAnimate && GetLastChar(nounRecord) == L'ь';
return nounRecord.haveMultipleForm && nounRecord.gender == NG_MALE && nounRecord.canBeAnimate && GetLastChar(nounRecord) == L'ь';
}
bool SecondNeutralEFormSingularCondition(const NounRecord& nounRecord)
@ -687,7 +574,7 @@ bool SecondNeutralEFormSingularCondition(const NounRecord& nounRecord)
bool SecondNeutralEFormPluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_NEUTRAL && GetLastChar(nounRecord) == L'е';
return nounRecord.haveMultipleForm && nounRecord.gender == NG_NEUTRAL && GetLastChar(nounRecord) == L'е';
}
bool SecondNeutralOFormSingularCondition(const NounRecord& nounRecord)
@ -697,67 +584,71 @@ bool SecondNeutralOFormSingularCondition(const NounRecord& nounRecord)
bool SecondNeutralOFormPluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_NEUTRAL && GetLastChar(nounRecord) == L'о';
return nounRecord.haveMultipleForm && nounRecord.gender == NG_NEUTRAL && GetLastChar(nounRecord) == L'о';
}
bool ThirdFormSingularCondition(const NounRecord& nounRecord)
bool ThirdFormSingularCondition(const NounRecord& nounRecord) //Same for both animate and inanimate
{
return nounRecord.haveSingleForm && nounRecord.gender == NG_FEMALE && GetLastChar(nounRecord) == L'ь';
}
bool ThirdFormInanimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_FEMALE && nounRecord.canBeInanimate && GetLastChar(nounRecord) == L'ь';
return nounRecord.haveMultipleForm && nounRecord.gender == NG_FEMALE && nounRecord.canBeInanimate && GetLastChar(nounRecord) == L'ь';
}
bool ThirdFormAnimatePluralCondition(const NounRecord& nounRecord)
{
return nounRecord.haveStandardMultipleForm && nounRecord.gender == NG_FEMALE && nounRecord.canBeAnimate && GetLastChar(nounRecord) == L'ь';
return nounRecord.haveMultipleForm && nounRecord.gender == NG_FEMALE && nounRecord.canBeAnimate && GetLastChar(nounRecord) == L'ь';
}
std::map<NounDeclencion, std::function < bool(const NounRecord&) >> DeclentionConditionMap;
std::map<std::pair<NounDeclencion, NounCount>, std::function < bool(const NounRecord&) >> DeclentionConditionMap;
void SetupDeclentionMap()
{
DeclentionConditionMap[FIRST_A_IFORM_SINGULAR] = std::bind(FirstAIFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_A_IFORM_INANIMATE_PLURAL] = std::bind(FirstAIFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_A_IFORM_ANIMATE_PLURAL] = std::bind(FirstAIFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_IFORM_INANIMATE, NC_SINGULAR}] = std::bind(FirstAIFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_IFORM_ANIMATE, NC_SINGULAR}] = std::bind(FirstAIFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_IFORM_INANIMATE, NC_PLURAL}] = std::bind(FirstAIFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_IFORM_ANIMATE, NC_PLURAL}] = std::bind(FirstAIFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_A_UFORM_SINGULAR] = std::bind(FirstAUFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_A_UFORM_INANIMATE_PLURAL] = std::bind(FirstAUFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_A_UFORM_ANIMATE_PLURAL] = std::bind(FirstAUFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_UFORM_INANIMATE, NC_SINGULAR}] = std::bind(FirstAUFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_UFORM_ANIMATE, NC_SINGULAR}] = std::bind(FirstAUFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_UFORM_INANIMATE, NC_PLURAL}] = std::bind(FirstAUFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_A_UFORM_ANIMATE, NC_PLURAL}] = std::bind(FirstAUFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_YA_FORM_SINGULAR] = std::bind(FirstYaFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_YA_FORM_INANIMATE_PLURAL] = std::bind(FirstYaFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[FIRST_YA_FORM_ANIMATE_PLURAL] = std::bind(FirstYaFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_YA_FORM_INANIMATE, NC_SINGULAR}] = std::bind(FirstYaFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_YA_FORM_ANIMATE, NC_SINGULAR}] = std::bind(FirstYaFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_YA_FORM_INANIMATE, NC_PLURAL}] = std::bind(FirstYaFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{FIRST_YA_FORM_ANIMATE, NC_PLURAL}] = std::bind(FirstYaFormAnimatePluralCondition, std::placeholders::_1);
//Second form
DeclentionConditionMap[SECOND_MALE_IFORM_INANIMATE_SINGULAR] = std::bind(SecondMaleIFormInanimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_IFORM_INANIMATE_PLURAL] = std::bind(SecondMaleIFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_IFORM_ANIMATE_SINGULAR] = std::bind(SecondMaleIFormAnimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_IFORM_ANIMATE_PLURAL] = std::bind(SecondMaleIFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_IFORM_INANIMATE, NC_SINGULAR}] = std::bind(SecondMaleIFormInanimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_IFORM_INANIMATE, NC_PLURAL}] = std::bind(SecondMaleIFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_IFORM_ANIMATE, NC_SINGULAR}] = std::bind(SecondMaleIFormAnimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_IFORM_ANIMATE, NC_PLURAL}] = std::bind(SecondMaleIFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_UFORM_INANIMATE_SINGULAR] = std::bind(SecondMaleUFormInanimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_UFORM_INANIMATE_PLURAL] = std::bind(SecondMaleUFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_UFORM_ANIMATE_SINGULAR] = std::bind(SecondMaleUFormAnimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_UFORM_ANIMATE_PLURAL] = std::bind(SecondMaleUFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_UFORM_INANIMATE, NC_SINGULAR}] = std::bind(SecondMaleUFormInanimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_UFORM_INANIMATE, NC_PLURAL}] = std::bind(SecondMaleUFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_UFORM_ANIMATE, NC_SINGULAR}] = std::bind(SecondMaleUFormAnimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_UFORM_ANIMATE, NC_PLURAL}] = std::bind(SecondMaleUFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_SSFORM_INANIMATE_SINGULAR] = std::bind(SecondMaleSSFormInanimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_SSFORM_INANIMATE_PLURAL] = std::bind(SecondMaleSSFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_SSFORM_ANIMATE_SINGULAR] = std::bind(SecondMaleSSFormAnimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_MALE_SSFORM_ANIMATE_PLURAL] = std::bind(SecondMaleSSFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_SSFORM_INANIMATE, NC_SINGULAR}] = std::bind(SecondMaleSSFormInanimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_SSFORM_INANIMATE, NC_PLURAL}] = std::bind(SecondMaleSSFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_SSFORM_ANIMATE, NC_SINGULAR}] = std::bind(SecondMaleSSFormAnimateSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_MALE_SSFORM_ANIMATE, NC_PLURAL}] = std::bind(SecondMaleSSFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_NEUTRAL_E_FORM_SINGULAR] = std::bind(SecondNeutralEFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_NEUTRAL_E_FORM_PLURAL] = std::bind(SecondNeutralEFormPluralCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_NEUTRAL_O_FORM_SINGULAR] = std::bind(SecondNeutralOFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[SECOND_NEUTRAL_O_FORM_PLURAL] = std::bind(SecondNeutralOFormPluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_NEUTRAL_E_FORM, NC_SINGULAR}] = std::bind(SecondNeutralEFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_NEUTRAL_E_FORM, NC_PLURAL}] = std::bind(SecondNeutralEFormPluralCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_NEUTRAL_O_FORM, NC_SINGULAR}] = std::bind(SecondNeutralOFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{SECOND_NEUTRAL_O_FORM, NC_PLURAL}] = std::bind(SecondNeutralOFormPluralCondition, std::placeholders::_1);
DeclentionConditionMap[THIRD_FORM_SINGULAR] = std::bind(ThirdFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[THIRD_FORM_INANIMATE_PLURAL] = std::bind(ThirdFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[THIRD_FORM_ANIMATE_PLURAL] = std::bind(ThirdFormAnimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{THIRD_FORM_INANIMATE, NC_SINGULAR}] = std::bind(ThirdFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{THIRD_FORM_ANIMATE, NC_SINGULAR}] = std::bind(ThirdFormSingularCondition, std::placeholders::_1);
DeclentionConditionMap[{THIRD_FORM_INANIMATE, NC_PLURAL}] = std::bind(ThirdFormInanimatePluralCondition, std::placeholders::_1);
DeclentionConditionMap[{THIRD_FORM_ANIMATE, NC_PLURAL}] = std::bind(ThirdFormAnimatePluralCondition, std::placeholders::_1);
}
@ -767,8 +658,16 @@ bool NounFitsDeclention(NounRecord nounRecord, NounTuple nounTuple)
{
NounDeclencion nounDeclencion = std::get<0>(nounTuple);
NounCount nounCount = std::get<1>(nounTuple);
return DeclentionConditionMap[nounDeclencion](nounRecord);
bool standardDeclention = DeclentionConditionMap[{nounDeclencion, nounCount}](nounRecord);
if (standardDeclention)
{
return true;
}
return false;
}
bool NounScructIsAlreadyInArray(const NounStruct& nounStruct, const std::vector<NounStruct>& arr)
@ -784,6 +683,59 @@ bool NounScructIsAlreadyInArray(const NounStruct& nounStruct, const std::vector<
return false;
}
bool IsDeclencionSecondType(NounDeclencion nounDeclention)
{
switch (nounDeclention)
{
case SECOND_MALE_IFORM_INANIMATE:
case SECOND_MALE_IFORM_ANIMATE:
case SECOND_MALE_UFORM_INANIMATE:
case SECOND_MALE_UFORM_ANIMATE:
case SECOND_MALE_SSFORM_INANIMATE:
case SECOND_MALE_SSFORM_ANIMATE:
return true;
break;
default:
return false;
break;
}
}
bool IsDeclencionAnimated(NounDeclencion nounDeclention)
{
switch (nounDeclention)
{
case FIRST_A_IFORM_ANIMATE:
case FIRST_A_UFORM_ANIMATE:
case FIRST_YA_FORM_ANIMATE:
case SECOND_MALE_IFORM_ANIMATE:
case SECOND_MALE_UFORM_ANIMATE:
case SECOND_MALE_SSFORM_ANIMATE:
case THIRD_FORM_ANIMATE:
return true;
break;
default:
return false;
break;
}
}
bool StandardTest(NounTuple nounTuple, NounRecord nounRecord)
{
return NounFitsDeclention(nounRecord, nounTuple);
}
bool LostVowelOTest(NounTuple nounTuple, NounRecord nounRecord)
{
return nounRecord.haveStandardMultipleFormWithMissingLastVowel;
}
bool LostVowelETest(NounTuple nounTuple, NounRecord nounRecord)
{
return nounRecord.haveStandardMultipleFormWithMissingLastVowel;
}
std::vector<NounStruct> RecognizeNoun(std::wstring noun)
{
@ -794,27 +746,91 @@ std::vector<NounStruct> RecognizeNoun(std::wstring noun)
for (auto nounEndingDivision : nounEndingDivisionArr)
{
std::wstring nounBase = nounEndingDivision.first;
std::wstring nounEnding = nounEndingDivision.second;
std::wstring nounBase = nounEndingDivision.base;
std::wstring nounEnding = nounEndingDivision.ending;
NounEndingDivision::DivisionCase dc = nounEndingDivision.divisionCase;
if (dc == NounEndingDivision::DC_LOST_VOWEL_O)
{
nounBase.insert(nounBase.begin() + nounBase.size() - 1, L'о');
}
if (dc == NounEndingDivision::DC_LOST_VOWEL_E)
{
nounBase[nounBase.size() - 2] = L'е';
}
std::vector<NounTuple> possibleTupleArr = GetPossibleNounTupleArr(nounEnding);
//std::vector<NounTuple> sureTupleArr;
//Standard check
for (auto nounTuple : possibleTupleArr)
for (NounTuple nounTuple : possibleTupleArr)
{
std::wstring nounNominaviteSingular = GetNounNoninativeSingular(nounBase, std::get<0>(nounTuple));
bool animated = IsDeclencionAnimated(std::get<0>(nounTuple));
bool additionalTest = true;
if (dc == NounEndingDivision::DC_LOST_VOWEL_O)
{
additionalTest = (std::get<1>(nounTuple) == NC_PLURAL) ||
((std::get<0>(nounTuple) != NGC_P1_NOMINATIVE) &&
(!(std::get<0>(nounTuple) == NGC_P4_ACCUSATIVE && !animated)));
}
if (dc == NounEndingDivision::DC_LOST_VOWEL_E)
{
additionalTest = (std::get<1>(nounTuple) == NC_PLURAL) ||
((std::get<0>(nounTuple) != NGC_P1_NOMINATIVE) &&
(!(std::get<0>(nounTuple) == NGC_P4_ACCUSATIVE && !animated)));
}
if (!additionalTest)
{
continue;
}
std::wstring nounNominaviteSingular = GetNounNoninative(nounBase, std::get<0>(nounTuple), NC_SINGULAR);
if (NounIsInDictionary(nounNominaviteSingular))
{
NounRecord nounRecord = GetNounRecordFromDictionary(nounNominaviteSingular);
if (NounFitsDeclention(nounRecord, nounTuple))
bool secondAdditionalTest = true;
if (dc == NounEndingDivision::DC_LOST_VOWEL_O)
{
//sureTupleArr.push_back(nounTuple);
result.push_back({ std::get<1>(nounTuple), nounRecord });
secondAdditionalTest = LostVowelOTest(nounTuple, nounRecord) && StandardTest(nounTuple, nounRecord);
}
else if (dc == NounEndingDivision::DC_LOST_VOWEL_E)
{
secondAdditionalTest = LostVowelETest(nounTuple, nounRecord) && StandardTest(nounTuple, nounRecord);
}
else
{
secondAdditionalTest = (nounRecord.haveStandardMultipleForm || std::get<1>(nounTuple) == NC_SINGULAR) && StandardTest(nounTuple, nounRecord);
}
if (secondAdditionalTest)
{
result.push_back({ std::get<2>(nounTuple), std::get<1>(nounTuple), animated, nounRecord });
//Check for additional form
if (IsDeclencionSecondType(std::get<0>(nounTuple)))
{
if (std::get<1>(nounTuple) == NC_SINGULAR && nounRecord.haveAlternativeMultipleFormEnding)
{
//Add additional form!
result.push_back({ NGC_P1_NOMINATIVE, NC_PLURAL, animated, nounRecord });
if (nounRecord.canBeInanimate)
{
result.push_back({ NGC_P4_ACCUSATIVE, NC_PLURAL, animated, nounRecord });
}
}
}
}
}
}
@ -822,31 +838,45 @@ std::vector<NounStruct> RecognizeNoun(std::wstring noun)
//Special plural form check
for (auto nounTuple : possibleTupleArr)
{
if (NounDeclencionIsPlural(std::get<0>(nounTuple)))
if (std::get<1>(nounTuple) == NC_PLURAL)
{
std::wstring nounNominavitePlural = GetNounNoninative(nounBase, std::get<0>(nounTuple));
std::wstring nounNominavitePlural = GetNounNoninative(nounBase, std::get<0>(nounTuple), NC_PLURAL);
if (NounSpecialPluralFormIsInDictionary(nounNominavitePlural))
{
NounRecord nounRecord = GetNounRecordFromDictionary_BySpecialPluralForm(nounNominavitePlural);
NounStruct ns{ std::get<1>(nounTuple), nounRecord };
if (!NounScructIsAlreadyInArray(ns, result))
if (nounRecord.canBeAnimate)
{
result.push_back(ns);
NounStruct ns{ std::get<2>(nounTuple), std::get<1>(nounTuple), true, nounRecord };
if (!NounScructIsAlreadyInArray(ns, result))
{
result.push_back(ns);
}
}
if (nounRecord.canBeInanimate)
{
NounStruct ns{ std::get<2>(nounTuple), std::get<1>(nounTuple), false, nounRecord };
if (!NounScructIsAlreadyInArray(ns, result))
{
result.push_back(ns);
}
}
}
}
}
}
return result;
}
@ -859,7 +889,7 @@ NounDeclencion CalculateNounDeclention(NounRecord nounRecord)
{
if (i.second(nounRecord))
{
return i.first;
return i.first.first;
}
}
@ -889,9 +919,11 @@ void LoadNounDeclencionCaseTable()
std::cout << "File found!" << std::endl;
std::vector<std::pair<NounGrammaticalCase, std::wstring>> currentGrammaticalCaseMap;
std::vector<GrammaticalTableRecord> currentGrammaticalCaseTable;
std::wstring currentNounDeclencion;
std::wstring currentNounCount;
getline(f, line); //Skip one line
while (getline(f, line))
{
@ -907,22 +939,31 @@ void LoadNounDeclencionCaseTable()
}
else
{
nounDeclencionCaseTable.push_back(NounDeclencionCaseTableRecord{ WStringToNounDeclencion(currentNounDeclencion), currentGrammaticalCaseMap });
nounDeclencionCaseTable.push_back(NounDeclencionCaseTableRecord{ WStringToNounDeclencion(currentNounDeclencion), currentGrammaticalCaseTable });
currentNounDeclencion = string_to_wstring(lineArr[0]);
currentGrammaticalCaseMap.clear();
currentGrammaticalCaseTable.clear();
}
}
currentGrammaticalCaseMap.push_back({ WStringToNounGrammaticalCase(string_to_wstring(lineArr[1])), string_to_wstring(lineArr[2]) });
if (lineArr[1] != "")
{
currentNounCount = string_to_wstring(lineArr[1]);
}
currentGrammaticalCaseTable.push_back({
WStringToNounCount(currentNounCount),
WStringToNounGrammaticalCase(string_to_wstring(lineArr[2])),
string_to_wstring(lineArr[3])
});
}
//Add last one
if (currentNounDeclencion != L"")
{
nounDeclencionCaseTable.push_back(NounDeclencionCaseTableRecord{ WStringToNounDeclencion(currentNounDeclencion), currentGrammaticalCaseMap });
nounDeclencionCaseTable.push_back(NounDeclencionCaseTableRecord{ WStringToNounDeclencion(currentNounDeclencion), currentGrammaticalCaseTable });
}
f.close();
@ -938,7 +979,7 @@ void LoadNounDeclencionCaseTable()
void LoadFrequentWordSet()
{
#ifdef _WIN32
std::ifstream f("C:/Workplace/ChineseJournal/rudict/frequent_nouns_2000.csv");
@ -951,6 +992,9 @@ void LoadFrequentWordSet()
if (f.is_open())
{
getline(f, line); //Skip one line
std::cout << "File found!" << std::endl;
while (getline(f, line))
{

View File

@ -27,6 +27,9 @@ struct NounRecord
bool haveStandardMultipleForm;
bool haveStandardMultipleFormWithMissingLastVowel;
bool haveStandardMultipleFormEnding;
bool haveAlternativeMultipleFormEnding;
std::wstring specialMultipleForm;
bool canBeAnimate;
@ -38,34 +41,22 @@ struct NounRecord
enum NounDeclencion
{
FIRST_A_IFORM_SINGULAR = 0,
FIRST_A_IFORM_INANIMATE_PLURAL,
FIRST_A_IFORM_ANIMATE_PLURAL,
FIRST_A_UFORM_SINGULAR,
FIRST_A_UFORM_INANIMATE_PLURAL,
FIRST_A_UFORM_ANIMATE_PLURAL,
FIRST_YA_FORM_SINGULAR,
FIRST_YA_FORM_INANIMATE_PLURAL,
FIRST_YA_FORM_ANIMATE_PLURAL,
SECOND_MALE_IFORM_INANIMATE_SINGULAR,
SECOND_MALE_IFORM_INANIMATE_PLURAL,
SECOND_MALE_IFORM_ANIMATE_SINGULAR,
SECOND_MALE_IFORM_ANIMATE_PLURAL,
SECOND_MALE_UFORM_INANIMATE_SINGULAR,
SECOND_MALE_UFORM_INANIMATE_PLURAL,
SECOND_MALE_UFORM_ANIMATE_SINGULAR,
SECOND_MALE_UFORM_ANIMATE_PLURAL,
SECOND_MALE_SSFORM_INANIMATE_SINGULAR,
SECOND_MALE_SSFORM_INANIMATE_PLURAL,
SECOND_MALE_SSFORM_ANIMATE_SINGULAR,
SECOND_MALE_SSFORM_ANIMATE_PLURAL,
SECOND_NEUTRAL_E_FORM_SINGULAR,
SECOND_NEUTRAL_E_FORM_PLURAL,
SECOND_NEUTRAL_O_FORM_SINGULAR,
SECOND_NEUTRAL_O_FORM_PLURAL,
THIRD_FORM_SINGULAR,
THIRD_FORM_INANIMATE_PLURAL,
THIRD_FORM_ANIMATE_PLURAL
FIRST_A_IFORM_INANIMATE = 0,
FIRST_A_IFORM_ANIMATE,
FIRST_A_UFORM_INANIMATE,
FIRST_A_UFORM_ANIMATE,
FIRST_YA_FORM_INANIMATE,
FIRST_YA_FORM_ANIMATE,
SECOND_MALE_IFORM_INANIMATE,
SECOND_MALE_IFORM_ANIMATE,
SECOND_MALE_UFORM_INANIMATE,
SECOND_MALE_UFORM_ANIMATE,
SECOND_MALE_SSFORM_INANIMATE,
SECOND_MALE_SSFORM_ANIMATE,
SECOND_NEUTRAL_E_FORM,
SECOND_NEUTRAL_O_FORM,
THIRD_FORM_INANIMATE,
THIRD_FORM_ANIMATE,
};
enum NounGrammaticalCase
@ -75,31 +66,88 @@ enum NounGrammaticalCase
NGC_P3_DATIVE,
NGC_P4_ACCUSATIVE,
NGC_P5_INSTRUMENTAL,
NGC_P6_PREPOSITIONAL
NGC_P6_PREPOSITIONAL,
NGC_SIZE
};
enum NounCount
{
NC_SINGULAR = 0,
NC_PLURAL,
NC_SIZE
};
struct GrammaticalTableRecord
{
NounCount count;
NounGrammaticalCase grammaticalCase;
std::wstring ending;
};
struct NounDeclencionCaseTableRecord
{
NounDeclencion nounDeclencion;
std::vector<std::pair<NounGrammaticalCase, std::wstring>> grammaticalCaseMap;
std::vector<GrammaticalTableRecord> grammaticalCaseTable;
};
extern std::vector<NounRecord> NounRecordArr;
extern std::vector<NounDeclencionCaseTableRecord> nounDeclencionCaseTable;
NounDeclencion WStringToNounDeclencion(std::wstring str);
std::wstring NounCountToWString(NounCount nounCount);
NounCount WStringToNounCount(std::wstring str);
std::wstring NounGrammaticalCaseToWString(NounGrammaticalCase nounGrammaticalCase);
NounGrammaticalCase WStringToNounGrammaticalCase(std::wstring str);
//std::wstring NounNumberToWString(NounNumber nounNumber);
typedef std::tuple<NounDeclencion, NounGrammaticalCase> NounTuple;
typedef std::tuple<
NounDeclencion,
NounCount,
NounGrammaticalCase
> NounTuple;
typedef std::set<std::wstring> StringSet;
struct NounEndingDivision
{
std::wstring base;
std::wstring ending;
enum DivisionCase
{
DC_COMMON = 0,
DC_LOST_VOWEL_O,
DC_LOST_VOWEL_E,
} divisionCase;
bool operator<(const NounEndingDivision& other) const
{
if (base != other.base)
{
return base < other.base;
}
else
{
if (ending != other.ending)
{
return ending < other.ending;
}
else
{
return divisionCase < other.divisionCase;
}
}
}
};
std::vector<std::wstring> GetAllNounEndingArr();
bool NounIsInDictionary(std::wstring nounNominative);
@ -117,28 +165,26 @@ bool charIsVowel(wchar_t c);
struct NounStruct
{
NounGrammaticalCase nounGrammaticalCase;
NounCount nounCount;
bool animated;
NounRecord nounRecord;
};
std::set<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivisionSet(std::wstring noun);
std::set<NounEndingDivision> getPossibleNounEndingDivisionSet(std::wstring noun);
std::vector<NounTuple> GetPossibleNounTupleArr(std::wstring nounEnding);
bool NounDeclencionIsPlural(NounDeclencion nounDeclencion);
NounDeclencion ConvertToSingularIfNeeded(NounDeclencion nounDeclencion);
std::wstring GetNounNoninativeSingular(std::wstring nounBase, NounDeclencion nounDeclencion);
std::wstring GetNounNoninativePlural(std::wstring nounBase, NounDeclencion nounDeclencion);
std::wstring GetNounNoninative(std::wstring nounBase, NounDeclencion nounDeclencion);
std::wstring GetNounNoninative(std::wstring nounBase, NounDeclencion nounDeclencion, NounCount nounCount);
void SetupDeclentionMap();
bool NounFitsDeclention(NounRecord nounRecord, NounTuple nounTuple);
bool IsDeclencionSecondType(NounDeclencion nounDeclention);
bool IsDeclencionAnimated(NounDeclencion nounDeclention);
std::vector<NounStruct> RecognizeNoun(std::wstring noun);
NounDeclencion CalculateNounDeclention(NounRecord nounRecord);