Commit ac1f9de779d344bf59d2b5be29cb06cb863bb9a5
1 parent
04edcb77
phrase/realisation descriptions fixes/updates
Showing
2 changed files
with
22 additions
and
3 deletions
entries/phrase_descriptions/descriptions.py
... | ... | @@ -343,6 +343,13 @@ def make_phraseologisms(phrase, function, negativity, attrs={}, controller=None, |
343 | 343 | feats = ['adj', attrs['num'], attrs['case'], attrs['gend'], 'pos'] |
344 | 344 | return ['‹{}›'.format(get_form('jakiś', feats)[0])] |
345 | 345 | if ptype in (LexAdjP, LexPPasP, LexPActP): |
346 | + print('****************', phrase, controller, controller_grammar) | |
347 | + # np. uczynić coś *jakimś* / kobietę *jakąś* | |
348 | + # w składni nie będzie controller_grammar | |
349 | + #TODO test? (***) | |
350 | + if not function and controller and controller_grammar: | |
351 | + function = controller._function._value if controller._function else None | |
352 | + control = True | |
346 | 353 | if ptype == LexAdjP: |
347 | 354 | phrase2 = phrase._adjp |
348 | 355 | POS = lambda lemma: correct_pos(lemma, 'adj') |
... | ... | @@ -363,9 +370,10 @@ def make_phraseologisms(phrase, function, negativity, attrs={}, controller=None, |
363 | 370 | CASE = correct_case(phrase2._case._value, function, negativity) |
364 | 371 | # np. uczynić coś *jakimś* / kobietę *jakąś* |
365 | 372 | # w składni nie będzie controller_grammar |
366 | - if controller and controller_grammar: | |
367 | - function = controller._function._value if controller._function else None | |
368 | - control = True | |
373 | + #TODO test? (***) | |
374 | + #if controller and controller_grammar: | |
375 | + # function = controller._function._value if controller._function else None | |
376 | + # control = True | |
369 | 377 | if phrase._number == 'agr' and 'num' in attrs: |
370 | 378 | num = attrs['num'] |
371 | 379 | assert (num != 'agr') |
... | ... |
importer/RealizationDescriptions.py
... | ... | @@ -469,6 +469,11 @@ def generate_phrases(function, negativity, phrase, lemma, is_predef, head_gender |
469 | 469 | phrase_type = phrase._name |
470 | 470 | dummy_id = None |
471 | 471 | |
472 | + # jak dotąd tylko jeden przypadek zagnieżdżonej frazy lex: | |
473 | + # zależeć: _: : imperf: subj{np(str);ncp(str,int)} + {prepnp(od,gen);prepncp(od,gen,int)} + {xp(mod[comprepnp(na sposób);advp(mod);lex(prepnp(w,acc),sg,'sposób',atr({adjp(agr)}))])} | |
474 | + if isinstance(phrase, LexPhrase): | |
475 | + return make_phraseologisms(phrase, function, negativity, controller=controller, controller_grammar=controller_grammar), None, None | |
476 | + | |
472 | 477 | if is_predef and phrase_type == 'xp' and not phrase._category._limitations: |
473 | 478 | advcat = phrase._category._value |
474 | 479 | # np. „komuś podobało się gdzieś” |
... | ... | @@ -1008,6 +1013,12 @@ FALLBACK = { |
1008 | 1013 | 'do zbiornika' : 2, |
1009 | 1014 | 'samo' : 1, |
1010 | 1015 | 'do (‹jakiejś›) ręki / do (‹jakichś›) rąk' : 2, |
1016 | + 'sama' : 1, | |
1017 | + 'w (moje/pańskie/Anny/…) (‹jakieś›) ręce' : 2, | |
1018 | + 'sam' : 1, | |
1019 | + 'przed (moje/pańskie/Anny/…) (‹jakieś›) oczy' : 2, | |
1020 | + 'sama' : 1, | |
1021 | + 'do (mojej/pańskiej/Anny/…) (‹jakiejś›) ręki / do (moich/pańskich/Anny/…) (‹jakichś›) rąk' : 2, | |
1011 | 1022 | } |
1012 | 1023 | |
1013 | 1024 | def fallback(description): |
... | ... |