Commit 74bcb2d2ba9e5cb46e314700d5c565da86c3597d
1 parent
2dd43901
TEI generation bugfix.
Showing
3 changed files
with
9 additions
and
2 deletions
dictionary/models.py
@@ -406,6 +406,9 @@ class Frame(Model): | @@ -406,6 +406,9 @@ class Frame(Model): | ||
406 | positions_str_tab = [position['position'].text_rep for position in sorted_positions] | 406 | positions_str_tab = [position['position'].text_rep for position in sorted_positions] |
407 | return u'%s:%s' % (':'.join(frame_chars_str_tab), ' + '.join(positions_str_tab)) | 407 | return u'%s:%s' % (':'.join(frame_chars_str_tab), ' + '.join(positions_str_tab)) |
408 | 408 | ||
409 | + def has_refl_args(self): | ||
410 | + return self.positions.filter(arguments__type__in=['refl', 'recip']).exists() | ||
411 | + | ||
409 | def __unicode__(self): | 412 | def __unicode__(self): |
410 | return '%s' % (self.text_rep) | 413 | return '%s' % (self.text_rep) |
411 | 414 |
dictionary/teixml.py
@@ -43,7 +43,7 @@ def createteixml(outpath, lemmas, frame_char_models, | @@ -43,7 +43,7 @@ def createteixml(outpath, lemmas, frame_char_models, | ||
43 | form_dict, q_frame_opinions): | 43 | form_dict, q_frame_opinions): |
44 | root = write_root() | 44 | root = write_root() |
45 | write_header(root) | 45 | write_header(root) |
46 | - lemmas = lemmas.filter(entry=u'administrować') | 46 | + #lemmas = lemmas.filter(entry=u'administrować') |
47 | write_entries(root, lemmas, frame_char_models, | 47 | write_entries(root, lemmas, frame_char_models, |
48 | form_dict, q_frame_opinions) | 48 | form_dict, q_frame_opinions) |
49 | with codecs.open(outpath, 'wt', 'utf-8') as output_file: | 49 | with codecs.open(outpath, 'wt', 'utf-8') as output_file: |
semantics/validation.py
@@ -94,9 +94,13 @@ def schemas_reflex_agreed(frame): | @@ -94,9 +94,13 @@ def schemas_reflex_agreed(frame): | ||
94 | for compl in complements: | 94 | for compl in complements: |
95 | for real in compl.realizations.all(): | 95 | for real in compl.realizations.all(): |
96 | schema_reflex = real.frame.get_char_value('ZWROTNOŚĆ').value | 96 | schema_reflex = real.frame.get_char_value('ZWROTNOŚĆ').value |
97 | - if not reflex_in_lexical_units(lexical_units, schema_reflex): | 97 | + if (not reflex_in_lexical_units(lexical_units, schema_reflex)): |
98 | return False | 98 | return False |
99 | return True | 99 | return True |
100 | + | ||
101 | +#def refl_like_phrase_type_pinned(compl, real): | ||
102 | +# same_frame_realizations = compl.realizations.filter(frame=real.frame, | ||
103 | +# alternation=real.alternation) | ||
100 | 104 | ||
101 | def reflex_in_lexical_units(lexical_units, reflex): | 105 | def reflex_in_lexical_units(lexical_units, reflex): |
102 | for lex_unit in lexical_units: | 106 | for lex_unit in lexical_units: |