Skip to content

Commit ddedaea

Browse files
authored
Merge pull request #128 from lenka-krippnerova/slavic-blocks
Update Slavic blocks
2 parents fc180b9 + 7841d88 commit ddedaea

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

udapi/block/msf/phrase.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def get_polarity(self, node, neg):
5959
return 'Neg'
6060

6161
def get_is_reflex(self,node,refl):
62+
if node.feats['Voice'] == 'Mid':
63+
return 'Yes'
6264
if len(refl) == 0:
6365
return node.feats['Reflex']
6466
return 'Yes'

udapi/block/msf/slavic/past.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def process_node(self, node):
3939
person=node.feats['Person'],
4040
number=node.feats['Number'],
4141
mood=node.feats['Mood'],
42-
voice='Pass',
42+
voice='Act', #In Polish, impersonal statements are annotated with Voice=Act. In Ukrainian, the Voice feature is missing; therefore, we decided to annotate these phrases with PhraseVoice=Act
4343
aspect=node.feats['Aspect'],
4444
form=node.feats['VerbForm'],
4545
polarity=self.get_polarity(node,neg),

udapi/block/msf/slavic/preprocessor.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ def process_node(self,node):
3131
# In Ukrainian, there is no explicit annotation of reflexive verbs
3232
# We decided to unify the annotation of reflexive verbs with Russian and Belarusian, where reflexive verbs are formed similarly
3333
# We add the feature Voice=Mid to reflexive verbs
34-
# This feature is added only to Ukrainian data (for example, there are some verbs in Old Church Slavonic that end in 'сь' but are not reflexive)
35-
if node.upos == 'VERB' and (node.form.endswith('сь') or node.form.endswith('ся')) and self.lang == 'uk':
34+
if node.upos == 'VERB' and (node.lemma.endswith('сь') or node.lemma.endswith('ся')):
3635
node.feats['Voice'] = 'Mid'
3736

3837
# makedonstina tvori budouci cas pomoci pomocneho slova ќе, u nejz neni nijak vyznaceno, ze se podili na tvorbe budouciho casu
@@ -72,5 +71,9 @@ def process_node(self,node):
7271
if node.feats['Mood'] == 'Sub':
7372
node.feats['Mood'] = 'Cnd'
7473

74+
# # although infinitives in Old Church Slavonic are annotated with Tense=Pres, they do not convey tense; therefore, we remove this annotation
75+
if node.feats['VerbForm'] == 'Inf':
76+
node.feats['Tense'] = ''
77+
7578
# TODO maybe we want to set Tense=Fut for the perfective verbs with Tense=Pres? This could solve the problem with the simplified detection of the future tense in Czech
7679
# but there are many verbs with no Aspect value, so the problem is still there

0 commit comments

Comments
 (0)