Commit 74bcb2d2ba9e5cb46e314700d5c565da86c3597d

Authored by Bartłomiej Nitoń
1 parent 2dd43901

TEI generation bugfix.

dictionary/models.py
... ... @@ -406,6 +406,9 @@ class Frame(Model):
406 406 positions_str_tab = [position['position'].text_rep for position in sorted_positions]
407 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 412 def __unicode__(self):
410 413 return '%s' % (self.text_rep)
411 414  
... ...
dictionary/teixml.py
... ... @@ -43,7 +43,7 @@ def createteixml(outpath, lemmas, frame_char_models,
43 43 form_dict, q_frame_opinions):
44 44 root = write_root()
45 45 write_header(root)
46   - lemmas = lemmas.filter(entry=u'administrować')
  46 + #lemmas = lemmas.filter(entry=u'administrować')
47 47 write_entries(root, lemmas, frame_char_models,
48 48 form_dict, q_frame_opinions)
49 49 with codecs.open(outpath, 'wt', 'utf-8') as output_file:
... ...
semantics/validation.py
... ... @@ -94,9 +94,13 @@ def schemas_reflex_agreed(frame):
94 94 for compl in complements:
95 95 for real in compl.realizations.all():
96 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 98 return False
99 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 105 def reflex_in_lexical_units(lexical_units, reflex):
102 106 for lex_unit in lexical_units:
... ...