Skip to content
Snippets Groups Projects
Commit d9f210a2 authored by Kasia Krasnowska's avatar Kasia Krasnowska
Browse files

phrase desc fix (removed resolving str case based on control, which was wrong)

parent 564f5bd5
Branches
Tags
No related merge requests found
......@@ -270,8 +270,8 @@ def make_phraseologisms(phrase, function, negativity, attrs={}, controller=None,
case = attrs['case'] if 'case' in attrs else 'nom'
POS = lambda lemma: correct_pos(lemma, 'subst')
NUM = lambda lemma: correct_num(lemma, phrase._number)
if not function and controller and controller._function and controller._function._value:
function = controller._function._value
#if not function and controller and controller._function and controller._function._value:
# function = controller._function._value
CASE = correct_case(case, function, negativity)
if case == 'str' and not function:
logging.warning('{}: couldn’t resolve str case in {}; assuming {}'.format(get_current_entry()._base, phrase, CASE))
......@@ -347,9 +347,9 @@ def make_phraseologisms(phrase, function, negativity, attrs={}, controller=None,
# np. uczynić coś *jakimś* / kobietę *jakąś*
# w składni nie będzie controller_grammar
#TODO test? (***)
if not function and controller and controller_grammar:
function = controller._function._value if controller._function else None
control = True
#if not function and controller and controller_grammar:
# function = controller._function._value if controller._function else None
# control = True
if ptype == LexAdjP:
phrase2 = phrase._adjp
POS = lambda lemma: correct_pos(lemma, 'adj')
......@@ -371,9 +371,9 @@ def make_phraseologisms(phrase, function, negativity, attrs={}, controller=None,
# np. uczynić coś *jakimś* / kobietę *jakąś*
# w składni nie będzie controller_grammar
#TODO test? (***)
#if controller and controller_grammar:
# function = controller._function._value if controller._function else None
# control = True
if controller and controller_grammar:
function = controller._function._value if controller._function else None
control = True
if phrase._number == 'agr' and 'num' in attrs:
num = attrs['num']
assert (num != 'agr')
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment