Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed Jun 16, 2024
1 parent 0a0c163 commit c456462
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 19 deletions.
47 changes: 43 additions & 4 deletions src/anthroponym-declension/anthroponym-inflector.test-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3303,12 +3303,12 @@
"patronymicName": "Петровича"
},
"ablative": {
"familyName": "Склярем",
"familyName": "Скляром",
"givenName": "Віром",
"patronymicName": "Петровичем"
},
"locative": {
"familyName": "Скляреві",
"familyName": "Склярові",
"givenName": "Вірові",
"patronymicName": "Петровичу"
},
Expand Down Expand Up @@ -7839,7 +7839,46 @@
}
}
},

{
"gender": "masculine",
"grammaticalCases": {
"nominative": {
"familyName": "Кобзар",
"givenName": "Микола",
"patronymicName": "Васильович"
},
"genitive": {
"familyName": "Кобзаря",
"givenName": "Миколи",
"patronymicName": "Васильовича"
},
"dative": {
"familyName": "Кобзарю",
"givenName": "Миколі",
"patronymicName": "Васильовичу"
},
"accusative": {
"familyName": "Кобзаря",
"givenName": "Миколу",
"patronymicName": "Васильовича"
},
"ablative": {
"familyName": "Кобзарем",
"givenName": "Миколою",
"patronymicName": "Васильовичем"
},
"locative": {
"familyName": "Кобзареві",
"givenName": "Миколі",
"patronymicName": "Васильовичу"
},
"vocative": {
"familyName": "Кобзарю",
"givenName": "Миколо",
"patronymicName": "Васильовичу"
}
}
},
{
"gender": "masculine",
"grammaticalCases": {
Expand Down Expand Up @@ -7880,4 +7919,4 @@
}
}
}
]
]
110 changes: 102 additions & 8 deletions src/word-declension/rules/artifacts/declension-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5942,18 +5942,112 @@
}
},
{
"description": "друга відміна / чоловічий рід / тверда група / на -яр",
"description": "чоловічі прізвища на -(ар|яр) як іменники м'якої групи",
"examples": [
"скляр"
"кожухар",
"кобзар",
"золяр",
"бондар",
"дігтяр",
"крамар"
],
"wordClass": "noun",
"gender": [
"masculine"
],
"priority": 2,
"applicationType": [
"familyName"
],
"pattern": {
"find": "(ар|яр)$",
"modify": "(.{1})$"
},
"grammaticalCases": {
"nominative": [],
"genitive": [
{
"0": {
"action": "append",
"value": "я"
}
}
],
"dative": [
{
"0": {
"action": "append",
"value": "ю"
}
},
{
"0": {
"action": "append",
"value": "еві"
}
}
],
"accusative": [
{
"0": {
"action": "append",
"value": "я"
}
}
],
"ablative": [
{
"0": {
"action": "append",
"value": "ем"
}
}
],
"locative": [
{
"0": {
"action": "append",
"value": "еві"
}
},
{
"0": {
"action": "append",
"value": "ю"
}
},
{
"0": {
"action": "append",
"value": "і"
}
}
],
"vocative": [
{
"0": {
"action": "append",
"value": "ю"
}
}
]
}
},
{
"description": "чоловічі прізвища на -(ар|яр) як іменники твердої групи",
"examples": [
"скляр",
"гайдар",
"гончар"
],
"wordClass": "noun",
"gender": [
"masculine"
],
"priority": 3,
"applicationType": [],
"pattern": {
"find": "яр$",
"find": "(скляр|гайдар|гончар)$",
"modify": "(.{1})$"
},
"grammaticalCases": {
Expand All @@ -5976,7 +6070,7 @@
{
"0": {
"action": "append",
"value": "еві"
"value": "ові"
}
}
],
Expand All @@ -5992,15 +6086,15 @@
{
"0": {
"action": "append",
"value": "ем"
"value": "ом"
}
}
],
"locative": [
{
"0": {
"action": "append",
"value": "еві"
"value": "ові"
}
},
{
Expand Down Expand Up @@ -6147,7 +6241,7 @@
}
},
{
"description": "друга відміна / чоловічий рід / тверда група / на -е(тверда_прилосона)",
"description": "друга відміна / чоловічий рід / тверда група / на -е(тверда_приголосна)",
"examples": [
"марек"
],
Expand Down Expand Up @@ -7785,4 +7879,4 @@
]
}
}
]
]
108 changes: 101 additions & 7 deletions src/word-declension/rules/noun-declension-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -3465,18 +3465,112 @@
}
},
{
"description": "друга відміна / чоловічий рід / тверда група / на -яр",
"description": "чоловічі прізвища на -(ар|яр) як іменники м'якої групи",
"examples": [
"скляр"
"кожухар",
"кобзар",
"золяр",
"бондар",
"дігтяр",
"крамар"
],
"wordClass": "noun",
"gender": [
"masculine"
],
"priority": 2,
"applicationType": [
"familyName"
],
"pattern": {
"find": "(ар|яр)$",
"modify": "(.{1})$"
},
"grammaticalCases": {
"nominative": [],
"genitive": [
{
"0": {
"action": "append",
"value": "я"
}
}
],
"dative": [
{
"0": {
"action": "append",
"value": "ю"
}
},
{
"0": {
"action": "append",
"value": "еві"
}
}
],
"accusative": [
{
"0": {
"action": "append",
"value": "я"
}
}
],
"ablative": [
{
"0": {
"action": "append",
"value": "ем"
}
}
],
"locative": [
{
"0": {
"action": "append",
"value": "еві"
}
},
{
"0": {
"action": "append",
"value": "ю"
}
},
{
"0": {
"action": "append",
"value": "і"
}
}
],
"vocative": [
{
"0": {
"action": "append",
"value": "ю"
}
}
]
}
},
{
"description": "чоловічі прізвища на -(ар|яр) як іменники твердої групи",
"examples": [
"скляр",
"гайдар",
"гончар"
],
"wordClass": "noun",
"gender": [
"masculine"
],
"priority": 3,
"applicationType": [],
"pattern": {
"find": "яр$",
"find": "(скляр|гайдар|гончар)$",
"modify": "(.{1})$"
},
"grammaticalCases": {
Expand All @@ -3499,7 +3593,7 @@
{
"0": {
"action": "append",
"value": "еві"
"value": "ові"
}
}
],
Expand All @@ -3515,15 +3609,15 @@
{
"0": {
"action": "append",
"value": "ем"
"value": "ом"
}
}
],
"locative": [
{
"0": {
"action": "append",
"value": "еві"
"value": "ові"
}
},
{
Expand Down Expand Up @@ -6298,4 +6392,4 @@
]
}
}
]
]

0 comments on commit c456462

Please sign in to comment.