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


class Person(Enum):

    # Иван Иванович Иванов
    Full = (
        ('word', {'labels': [
            ('gram', 'Surn'),
            ('gram-not', 'Abbr'),
        ]}),
        ('word', {'labels': [
            ('gram', 'Name'),
            ('gram-not', 'Abbr'),
            ('gender-match', -1),
        ]}),
        ('word', {'labels': [
            ('gram', 'Patr'),
            ('gram-not', 'Abbr'),
            ('gender-match', -1),
        ]}),
        TERM
    )
    # Иванов Иван Иванович
    FullReversed = (
        ('word', {'labels': [
            ('gram', 'Name'),
            ('gram-not', 'Abbr'),
        ]}),
        ('word', {'labels': [
            ('gram', 'Patr'),
            ('gram-not', 'Abbr'),
            ('gender-match', -1),
        ]}),
        ('word', {'labels': [
            ('gram', 'Surn'),
            ('gram-not', 'Abbr'),
            ('gender-match', -1),
        ]}),
        TERM
    )
    # Иван Иванов
    FisrtnameAndLastname = (
        ('word', {'labels': [
            ('gram', 'Name'),
            ('gram-not', 'Abbr'),
        ]}),
        ('word', {'labels': [
            ('gram', 'Surn'),
            ('gram-not', 'Abbr'),
            ('gender-match', -1),
        ]}),
        TERM
    )
    # Иванов Иван
    LastnameAndFirstname = (
        ('word', {'labels': [
            ('gram', 'Surn'),
            ('gram-not', 'Abbr'),
        ]}),
        ('word', {'labels': [
            ('gram', 'Name'),
            ('gram-not', 'Abbr'),
            ('gender-match', -1),
        ]}),
        TERM
    )
    # Иван Иванович
    FirstnameAndMiddlename = (
        ('word', {'labels': [
            ('gram', 'Name'),
            ('gram-not', 'Abbr'),
        ]}),
        ('word', {'labels': [
            ('gram', 'Patr'),
            ('gram-not', 'Abbr'),
            ('gender-match', -1),
        ]}),
        TERM
    )

@@ -1907,28 +1907,339 @@
     %5D%7D),%0A        TERM%0A    )%0A
+    # %D0%98%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2%0A    Lastname = (%0A        ('word', %7B'labels': %5B%0A            ('gram', 'Surn'),%0A            ('gram-not', 'Abbr'),%0A        %5D%7D),%0A        TERM%0A    )%0A    # %D0%98%D0%B2%D0%B0%D0%BD%0A    Firstname = (%0A        ('word', %7B'labels': %5B%0A            ('gram', 'Name'),%0A            ('gram-not', 'Abbr'),%0A        %5D%7D),%0A        TERM%0A    )%0A

Add Lastname & Firstname rules