213 lines
4.6 KiB
Python
213 lines
4.6 KiB
Python
POSSIBLE_WORD_FORM_FEATURE_VALUES = {
|
|
"singular",
|
|
"dual",
|
|
"plural",
|
|
"nominative",
|
|
"genitive",
|
|
"dative",
|
|
"accusative",
|
|
"locative",
|
|
"instrumental",
|
|
"infinitive",
|
|
"supine",
|
|
"participle",
|
|
"present",
|
|
"future",
|
|
"conditional",
|
|
"imperative",
|
|
'masculine',
|
|
'feminine',
|
|
'neuter',
|
|
}
|
|
|
|
CODES_TRANSLATION = {
|
|
"N": {
|
|
2: {
|
|
'-': 'masculine',
|
|
'm': 'masculine',
|
|
'f': 'feminine',
|
|
'n': 'neuter',
|
|
},
|
|
3: {
|
|
"-": "singular",
|
|
"s": "singular",
|
|
"d": "dual",
|
|
"p": "plural",
|
|
},
|
|
4: {
|
|
"-": "nominative",
|
|
"n": "nominative",
|
|
"g": "genitive",
|
|
"d": "dative",
|
|
"a": "accusative",
|
|
"l": "locative",
|
|
"i": "instrumental",
|
|
},
|
|
},
|
|
"V": {
|
|
1: {
|
|
"-": "main",
|
|
"m": "main",
|
|
"a": "auxiliary",
|
|
},
|
|
3: {
|
|
"-": "infinitive",
|
|
"n": "infinitive",
|
|
"u": "supine",
|
|
"p": "participle",
|
|
"r": "present",
|
|
"f": "future",
|
|
"c": "conditional",
|
|
"m": "imperative",
|
|
},
|
|
4: {
|
|
"-": "first",
|
|
"1": "first",
|
|
"2": "second",
|
|
"3": "third",
|
|
},
|
|
5: {
|
|
"-": "singular",
|
|
"s": "singular",
|
|
"d": "dual",
|
|
"p": "plural",
|
|
},
|
|
6: {
|
|
'-': 'masculine',
|
|
'm': 'masculine',
|
|
'f': 'feminine',
|
|
'n': 'neuter',
|
|
},
|
|
8: {
|
|
"-": "no",
|
|
"n": "no",
|
|
"y": "yes",
|
|
},
|
|
},
|
|
"A": {
|
|
1: {
|
|
"-": "general",
|
|
"g": "general",
|
|
"s": "possessive",
|
|
},
|
|
2: {
|
|
"-": "positive",
|
|
"p": "positive",
|
|
"c": "comparative",
|
|
"s": "superlative",
|
|
},
|
|
3: {
|
|
'-': 'masculine',
|
|
'm': 'masculine',
|
|
'f': 'feminine',
|
|
'n': 'neuter',
|
|
},
|
|
4: {
|
|
"-": "singular",
|
|
"s": "singular",
|
|
"d": "dual",
|
|
"p": "plural",
|
|
},
|
|
5: {
|
|
"-": "nominative",
|
|
"n": "nominative",
|
|
"g": "genitive",
|
|
"d": "dative",
|
|
"a": "accusative",
|
|
"l": "locative",
|
|
"i": "instrumental",
|
|
},
|
|
}
|
|
}
|
|
|
|
CODES = {
|
|
"Noun": "N",
|
|
"Verb": "V",
|
|
"Adjective": "A",
|
|
"Adverb": "R",
|
|
"Pronoun": "P",
|
|
"Numeral": "M",
|
|
"Preposition": "S",
|
|
"Conjunction": "C",
|
|
"Particle": "Q",
|
|
"Interjection": "I",
|
|
"Abbreviation": "Y",
|
|
"Residual": "X",
|
|
|
|
'common': 'c',
|
|
'proper': 'p',
|
|
'masculine': 'm',
|
|
'feminine': 'f',
|
|
'neuter': 'n',
|
|
"singular": "s",
|
|
"dual": "d",
|
|
"plural": "p",
|
|
"nominative": "n",
|
|
"genitive": "g",
|
|
"dative": "d",
|
|
"accusative": "a",
|
|
"locative": "l",
|
|
"instrumental": "i",
|
|
"no": "n",
|
|
"yes": "y",
|
|
"main": "m",
|
|
"auxiliary": "a",
|
|
"perfective": "e",
|
|
"progressive": "p",
|
|
"biaspectual": "b",
|
|
"infinitive": "n",
|
|
"supine": "u",
|
|
"participle": "p",
|
|
"present": "r",
|
|
"future": "f",
|
|
"conditional": "c",
|
|
"imperative": "m",
|
|
"first": "1",
|
|
"second": "2",
|
|
"third": "3",
|
|
"general": "g",
|
|
"possessive": "s",
|
|
"positive": "p",
|
|
"comparative": "c",
|
|
"superlative": "s",
|
|
"personal": "p",
|
|
"demonstrative": "d",
|
|
"relative": "r",
|
|
"reflexive": "x",
|
|
"interrogative": "q",
|
|
"indefinite": "i",
|
|
"negative": "z",
|
|
"bound": "b",
|
|
"digit": "d",
|
|
"roman": "r",
|
|
"letter": "l",
|
|
"cardinal": "c",
|
|
"ordinal": "o",
|
|
"pronominal": "p",
|
|
"special": "s",
|
|
"coordinating": "c",
|
|
"subordinating": "s",
|
|
"foreign": "f",
|
|
"typo": "t",
|
|
"program": "p",
|
|
"web": "w",
|
|
"emo": "e",
|
|
"hashtag": "h",
|
|
"at": "a"
|
|
}
|
|
|
|
TAGSET = {
|
|
"N": ['type', 'gender', 'number', 'case', 'animate'],
|
|
"V": ['type', 'aspect', 'vform', 'person', 'number', 'gender', 'negative'],
|
|
"A": ['type', 'degree', 'gender', 'number', 'case', 'definiteness'],
|
|
"R": ['type', 'degree'],
|
|
"P": ['type', 'person', 'gender', 'number', 'case', 'owner_number', 'owned_gender', 'clitic'],
|
|
"M": ['form', 'type', 'gender', 'number', 'case', 'definiteness'],
|
|
"S": ['case'],
|
|
"C": ['type'],
|
|
"Q": [],
|
|
"I": [],
|
|
"Y": [],
|
|
"X": ['type']
|
|
}
|