Commit 863ede63d734f5eacf494dcd72637b04dc850050
Merge branch 'tomek' into dev
Showing
1 changed file
with
15 additions
and
3 deletions
semantics/phraseology_generator.py
... | ... | @@ -63,7 +63,11 @@ def get_case(attribute, is_subj, negativity, reference=None): |
63 | 63 | case = u'acc' |
64 | 64 | elif case == u'agr' and reference is not None: |
65 | 65 | _, tag = reference |
66 | - case = tag.split(':')[2] | |
66 | + base = tag.split(':')[0] | |
67 | + if base == u'siebie': | |
68 | + case = tag.split(':')[1] | |
69 | + else: | |
70 | + case = tag.split(':')[2] | |
67 | 71 | return case |
68 | 72 | |
69 | 73 | def get_number(attribute, is_subj, reference=None): |
... | ... | @@ -73,7 +77,11 @@ def get_number(attribute, is_subj, reference=None): |
73 | 77 | number = u'sg' |
74 | 78 | elif number == u'agr' and reference is not None: |
75 | 79 | _, tag = reference |
76 | - number = tag.split(':')[1] | |
80 | + base = tag.split(':')[0] | |
81 | + if base == u'siebie': | |
82 | + number = u'_' | |
83 | + else: | |
84 | + number = tag.split(':')[1] | |
77 | 85 | return number |
78 | 86 | |
79 | 87 | def get_gender(attribute, reference=None): |
... | ... | @@ -86,7 +94,11 @@ def get_gender(attribute, reference=None): |
86 | 94 | gender = u'm1' |
87 | 95 | elif gender == u'agr' and reference is not None: |
88 | 96 | _, tag = reference |
89 | - gender = tag.split(':')[3] | |
97 | + base = tag.split(':')[0] | |
98 | + if base == u'siebie': | |
99 | + gender = u'_' | |
100 | + else: | |
101 | + gender = tag.split(':')[3] | |
90 | 102 | return gender |
91 | 103 | |
92 | 104 | def get_degree(attribute): |
... | ... |