Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ValUnifer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPIPAN
ValUnifer
Commits
d9f210a2
Commit
d9f210a2
authored
3 years ago
by
Kasia Krasnowska
Browse files
Options
Downloads
Patches
Plain Diff
phrase desc fix (removed resolving str case based on control, which was wrong)
parent
564f5bd5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
entries/phrase_descriptions/descriptions.py
+8
-8
8 additions, 8 deletions
entries/phrase_descriptions/descriptions.py
with
8 additions
and
8 deletions
entries/phrase_descriptions/descriptions.py
+
8
−
8
View file @
d9f210a2
...
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment