From d9f210a2c9c78529d0df90618ecde9940d2c6bff Mon Sep 17 00:00:00 2001
From: Kasia Krasnowska <kasia.krasnowska@gmail.com>
Date: Wed, 7 Jul 2021 16:53:02 +0200
Subject: [PATCH] phrase desc fix (removed resolving str case based on control,
 which was wrong)

---
 entries/phrase_descriptions/descriptions.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/entries/phrase_descriptions/descriptions.py b/entries/phrase_descriptions/descriptions.py
index 8c37a91..32a259d 100644
--- a/entries/phrase_descriptions/descriptions.py
+++ b/entries/phrase_descriptions/descriptions.py
@@ -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')
-- 
GitLab