From 52e2839346151009a9cea1f78d52675ec7665080 Mon Sep 17 00:00:00 2001 From: Kasia Krasnowska <kasia.krasnowska@gmail.com> Date: Wed, 14 Jul 2021 17:15:39 +0200 Subject: [PATCH] code cleanup: less importer output --- entries/phrase_descriptions/descriptions.py | 1 - importer/RealizationDescriptions.py | 13 ++++++------- importer/Realizations.py | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/entries/phrase_descriptions/descriptions.py b/entries/phrase_descriptions/descriptions.py index 32a259d..61600c4 100644 --- a/entries/phrase_descriptions/descriptions.py +++ b/entries/phrase_descriptions/descriptions.py @@ -343,7 +343,6 @@ def make_phraseologisms(phrase, function, negativity, attrs={}, controller=None, feats = ['adj', attrs['num'], attrs['case'], attrs['gend'], 'pos'] return ['‹{}›'.format(get_form('jakiś', feats)[0])] if ptype in (LexAdjP, LexPPasP, LexPActP): - print('****************', phrase, controller, controller_grammar) # np. uczynić coś *jakimś* / kobietę *jakąś* # w składni nie będzie controller_grammar #TODO test? (***) diff --git a/importer/RealizationDescriptions.py b/importer/RealizationDescriptions.py index e24559e..3f726b6 100644 --- a/importer/RealizationDescriptions.py +++ b/importer/RealizationDescriptions.py @@ -498,7 +498,7 @@ def generate_phrases(function, negativity, phrase, lemma, is_predef, head_gender phrase = NP(Case('gen'), dummy_id) # i przetwarzanie dalej jako np - print('PHRASE TYPE:', phrase_type, 'LEMMA:', processed_lemma, 'MODIFICATION:', mod, 'FUNCTION:', function) + #print('PHRASE TYPE:', phrase_type, 'LEMMA:', processed_lemma, 'MODIFICATION:', mod, 'FUNCTION:', function) words = Words('concat', 'xor', [processed_lemma]) # TODO @@ -705,9 +705,9 @@ def get_phrase_description(subentry, argument, position, phrase, controller_gram # subentry, argument: DB model objects # schema, phrase: importer objects def get_phrase_description2(subentry, argument, position, phrase, controller_grammar=None): - print() - print(argument) - print(phrase) + #print() + #print(argument) + #print(phrase) gender, number = None, None function = position._function._value if position._function else None control = None @@ -945,7 +945,7 @@ def get_argument_realisation_priority(ar, entry_pos): # jeśli nie ma nic na początku, a jest np(dat), to przesuwamy na początek def rerank(ars): - print(ars) + #print(ars) before, after, np_dat = [], [], [] for rank, fallback, ar in ars: if rank[0] == 0: @@ -1033,7 +1033,7 @@ WINIEN = ('powinien', 'winien',) def get_realisation_description(realisation, subentry, aspect): entry = subentry.entry ars = [(get_argument_realisation_priority(ar, entry.pos.tag), fallback(ar._description), ar) for ar in realisation._argument_realizations] - print([(p1, p2, ar._description) for p1, p2, ar in ars]) + #print([(p1, p2, ar._description) for p1, p2, ar in ars]) try: ars = sorted(ars) except: @@ -1091,7 +1091,6 @@ def get_realisation_description(realisation, subentry, aspect): # bokser sparuje — imperf nienotowane w Morfeuszu entry_form = 'sparuje' else: - print(entry_base, ['fin', subj_num, 'ter', 'imperf']) entry_form = get_form(entry_base, ['fin', subj_num, 'ter', 'imperf'])[0] else: # dokonane: praet (cz. przeszły) diff --git a/importer/Realizations.py b/importer/Realizations.py index 393efd8..3c46936 100644 --- a/importer/Realizations.py +++ b/importer/Realizations.py @@ -142,7 +142,7 @@ class FrameRealization: # ar.store(subentry, frame, schema, alternation, controller_grammar=controller_grammar) description = get_realisation_description(self, subentry, self._schema.getAspect()) #print('**************************', controller_grammar) - print('================================', description) + #print('================================', description) RealisationDescription.objects.create(frame=frame, schema=schema, alternation=alternation, -- GitLab