Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
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
Syntactic Tools
combo
Commits
50ea5469
There was an error fetching the commit references. Please try again later.
Commit
50ea5469
authored
4 years ago
by
Mateusz Klimaszewski
Committed by
Mateusz Klimaszewski
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Sort feats by lowercase to match iwpt script.
parent
a2137989
2 merge requests
!9
Enhanced dependency parsing develop to master
,
!8
Enhanced dependency parsing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
combo/predict.py
+3
-1
3 additions, 1 deletion
combo/predict.py
with
3 additions
and
1 deletion
combo/predict.py
+
3
−
1
View file @
50ea5469
...
@@ -173,7 +173,9 @@ class SemanticMultitaskPredictor(predictor.Predictor):
...
@@ -173,7 +173,9 @@ class SemanticMultitaskPredictor(predictor.Predictor):
if
len
(
features
)
==
0
:
if
len
(
features
)
==
0
:
field_value
=
"
_
"
field_value
=
"
_
"
else
:
else
:
field_value
=
"
|
"
.
join
(
sorted
(
features
))
lowercase_features
=
[
f
.
lower
()
for
f
in
features
]
arg_indices
=
sorted
(
range
(
len
(
lowercase_features
)),
key
=
lowercase_features
.
__getitem__
)
field_value
=
"
|
"
.
join
(
np
.
array
(
features
)[
arg_indices
].
tolist
())
token
[
field_name
]
=
field_value
token
[
field_name
]
=
field_value
elif
field_name
==
"
lemma
"
:
elif
field_name
==
"
lemma
"
:
...
...
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