Commit cadcdd33f66b4d0e814ef6e484e892dcaa36f8d0
1 parent
80b919c4
Minor fix to get_pred_prepnp_jako_str2check command.
Showing
1 changed file
with
10 additions
and
0 deletions
dictionary/management/commands/get_pred_prepnp_jako_str2check.py
... | ... | @@ -17,6 +17,8 @@ class Command(BaseCommand): |
17 | 17 | for phrase_type in pos.arguments.all(): |
18 | 18 | if self.phrase_type_is_prepnp_jako_str(phrase_type): |
19 | 19 | pred_prepnp_jako_str_exists = True |
20 | + elif self.phrase_type_is_prepadjp_jako_str(phrase_type): | |
21 | + pred_prepnp_jako_str_exists = True | |
20 | 22 | else: |
21 | 23 | other_pred_exists = True |
22 | 24 | if pred_prepnp_jako_str_exists and other_pred_exists: |
... | ... | @@ -30,3 +32,11 @@ class Command(BaseCommand): |
30 | 32 | phrase_type.atributes.get(type='TYP FRAZY').values.all()[0].argument.text_rep == 'prepnp(jako,str)'): |
31 | 33 | return True |
32 | 34 | return False |
35 | + | |
36 | + def phrase_type_is_prepadjp_jako_str(self, phrase_type): | |
37 | + if (phrase_type.text_rep == 'prepadjp(jako,str)'): | |
38 | + return True | |
39 | + if (phrase_type.type == 'lex' and | |
40 | + phrase_type.atributes.get(type='TYP FRAZY').values.all()[0].argument.text_rep == 'prepadjp(jako,str)'): | |
41 | + return True | |
42 | + return False | |
... | ... |