from enum import Enum
from natasha.grammars.base import TERM


MONTH_DICTIONARY = {
    'январь',
    'февраль',
    'март',
    'апрель',
    'май',
    'июнь',
    'июль',
    'август',
    'сентябрь',
    'октябрь',
    'ноябрь',
    'декабрь',
}

DAY_GRAMMAR = ('int', {
    'labels': [
        ('gte', 1),
        ('lte', 31),
    ],
})

MONTH_GRAMMAR = ('word', {
    'labels': [
        ('dictionary', MONTH_DICTIONARY),
    ],
})

YEAR_GRAMMAR = ('int', {
    'labels': [
        ('gte', 1),
    ],
})

class Date(Enum):

    Full = (
        DAY_GRAMMAR,
        MONTH_GRAMMAR,
        YEAR_GRAMMAR,
        TERM,
    )

    FullWithDigits = (
        DAY_GRAMMAR,
        ('int', {
            'labels': [
                ('gte', 1),
                ('lte', 12),
            ],
        }),
        YEAR_GRAMMAR,
        TERM,
    )

    DayAndMonth = (
        DAY_GRAMMAR,
        MONTH_GRAMMAR,
        TERM,
    )

    Year = (
        YEAR_GRAMMAR,
        ('word', {
            'labels': [
                ('dictionary', {'год', })
            ]
        }),
        TERM,

    )

@@ -252,250 +252,777 @@
 DAY_
-GRAMMAR = ('int', %7B%0A    'labels': %5B%0A        ('gte', 1),%0A        ('lte', 31),%0A    %5D,%0A%7D)%0A%0AMONTH_GRAMMAR = ('word', %7B%0A    'labels': %5B%0A        ('dictionary', MONTH_DICTIONARY),%0A    %5D,%0A%7D)%0A%0AYEAR_GRAMMAR = ('int', %7B%0A    'labels': %5B%0A        ('gte', 1
+OF_WEEK_DICTIONARY = %7B%0A    '%D0%BF%D0%BE%D0%BD%D0%B5%D0%B4%D0%B5%D0%BB%D1%8C%D0%BD%D0%B8%D0%BA',%0A    '%D0%B2%D1%82%D0%BE%D1%80%D0%BD%D0%B8%D0%BA',%0A    '%D1%81%D1%80%D0%B5%D0%B4%D0%B0',%0A    '%D1%87%D0%B5%D1%82%D0%B2%D0%B5%D1%80%D0%B3',%0A    '%D0%BF%D1%8F%D1%82%D0%BD%D0%B8%D1%86%D0%B0',%0A    '%D1%81%D1%83%D0%B1%D0%B1%D0%BE%D1%82%D0%B0',%0A    '%D0%B2%D0%BE%D1%81%D0%BA%D1%80%D0%B5%D1%81%D0%B5%D0%BD%D1%8C%D0%B5',%0A%7D%0A%0APARTIAL_DATE_DICTIONARY = %7B%0A    '%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%BE',%0A    '%D1%81%D0%B5%D1%80%D0%B8%D0%B4%D0%B8%D0%BD%D0%B0',%0A    '%D0%BA%D0%BE%D0%BD%D0%B5%D1%86',%0A%7D%0A%0ADAY_GRAMMAR = ('int', %7B%0A    'labels': %5B%0A        ('gte', 1),%0A        ('lte', 31),%0A    %5D,%0A%7D)%0A%0AMONTH_GRAMMAR = ('word', %7B%0A    'labels': %5B%0A        ('dictionary', MONTH_DICTIONARY),%0A    %5D,%0A%7D)%0A%0ADAY_OF_WEEK_GRAMMAR = ('word', %7B%0A    'labels': %5B%0A        ('dictionary', DAY_OF_WEEK_DICTIONARY),%0A    %5D,%0A%7D)%0A%0AYEAR_GRAMMAR = ('int', %7B%0A    'labels': %5B%0A        ('gte', 1),%0A    %5D,%0A%7D)%0A%0AYEAR_SUFFIX_GRAMMAR = ('word', %7B%0A    'labels': %5B%0A        ('dictionary', %7B'%D0%B3%D0%BE%D0%B4', %7D)%0A    %5D,%0A%7D)%0A%0APARTIAL_DATE_GRAMMAR = ('word', %7B%0A    'labels': %5B%0A        ('dictionary', PARTIAL_DATE_DICTIONARY
 ),%0A 
@@ -1495,42 +1495,157 @@
     
-('word', %7B%0A            'labels': %5B
+YEAR_SUFFIX_GRAMMAR,%0A        TERM,%0A%0A    )%0A%0A    PartialYearObject = (%0A        PARTIAL_DATE_GRAMMAR,%0A        YEAR_GRAMMAR,%0A        YEAR_SUFFIX_GRAMMAR,
 %0A   
@@ -1653,66 +1653,225 @@
     
+TERM,%0A
     
+)%0A%0A
     
-('dictionary', %7B'%D0%B3%D0%BE%D0%B4', %7D
+PartialMonthObject = (%0A        PARTIAL_DATE_GRAMMAR,%0A        MONTH_GRAMMAR,%0A        TERM,%0A    
 )%0A
+%0A
     
-        %5D%0A        %7D)
+Month = (%0A        MONTH_GRAMMAR,%0A        TERM,%0A    )%0A%0A    DayOfWeek = (%0A        DAY_OF_WEEK_GRAMMAR
 ,%0A  
@@ -1866,31 +1866,30 @@
 _GRAMMAR,%0A        TERM,%0A
-%0A
     )%0A

Add day of week & partial date rules