Commit 93f2de69aa852307f5de6774f87425097f3e61ff

Authored by Bartłomiej Nitoń
1 parent 669991ce

Removed status constraints for phraseologic schemata while generating exports.

dictionary/ajax_vocabulary_management.py
... ... @@ -94,8 +94,6 @@ def create_text_walenty(file_name, lemmas, vocabularies, frame_opinions,
94 94 pred_val=pred_val,
95 95 aspect_val=aspect_val).order_by('text_rep')
96 96 for frame in matching_frames:
97   - if not lemma.phraseology_ready() and frame.phraseologic:
98   - continue
99 97 if not frame_opinions or founded_frame_opinions.filter(frame=frame).exists():
100 98 text_rep = frame.get_position_spaced_text_rep()
101 99 if add_frame_opinions:
... ...
dictionary/management/commands/get_examples.py
... ... @@ -44,8 +44,6 @@ def write_detailed_examples(statuses):
44 44 lemma_entry = lemma.entry_obj.name
45 45 lemma_status = lemma.status.status
46 46 for frame in lemma.frames.order_by('text_rep').all():
47   - if not lemma.phraseology_ready() and frame.phraseologic:
48   - continue
49 47 frame_opinion = lemma.frame_opinions.filter(frame=frame).all()[0].value
50 48 for example in lemma.nkjp_examples.filter(frame=frame):
51 49 sentence = example.sentence.replace('\n', ' ').replace('\r', '').replace('\t', ' ')
... ...
dictionary/models.py
... ... @@ -228,13 +228,6 @@ class Lemma(Model):
228 228 except Frame_Opinion.DoesNotExist:
229 229 pass
230 230 return frame_opinion_name
231   -
232   - def phraseology_ready(self):
233   - actual_status = self.status
234   - ready_f_status = Lemma_Status.objects.get(type__sym_name='ready_f')
235   - if actual_status.priority >= ready_f_status.priority:
236   - return True
237   - return False
238 231  
239 232 def semantics_ready(self):
240 233 actual_status = self.status
... ...
dictionary/teixml.py
... ... @@ -128,8 +128,6 @@ def write_syntactic_layer(entry_elem, lemma, frame_opinions, frame_opinion_value
128 128 pred_val=pred_val,
129 129 aspect_val=aspect_val).order_by('text_rep')
130 130 for frame in matchingframes:
131   - if not lemma.phraseology_ready() and frame.phraseologic:
132   - continue
133 131 if (not frame_opinion_values.exists() or frame_opinions.filter(frame=frame).exists()):
134 132 write_schema(vColl_elem, frame, lemma)
135 133  
... ... @@ -458,10 +456,7 @@ def write_examples_layer(parent_elem, lemma):
458 456  
459 457 def write_examples_feature(parent_elem, lemma):
460 458 for example in lemma.nkjp_examples.order_by('opinion__priority').all():
461   - if not lemma.phraseology_ready() and example.frame.phraseologic:
462   - pass
463   - else:
464   - write_example(parent_elem, lemma, example)
  459 + write_example(parent_elem, lemma, example)
465 460 for example in lemma.lemma_nkjp_examples.order_by('opinion__priority').all():
466 461 write_example(parent_elem, lemma, example)
467 462  
... ...
dictionary/templatetags/tex_tags.py
... ... @@ -83,8 +83,6 @@ def lemma_tex(lemma, loop_counter, q_frame_opinions, download_dict):
83 83 pred_val=pred_val,
84 84 aspect_val=aspect_val).order_by('text_rep')
85 85 for frame in matching_frames:
86   - if not lemma.phraseology_ready() and frame.phraseologic:
87   - continue
88 86 if not download_dict['frame_opinions'] or (frame_opinions and frame_opinions.filter(frame=frame).count() > 0):
89 87 frames.append(frame)
90 88 return {'lemma': lemma,
... ...