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
Merge requests
!36
Release 1.0.4
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Release 1.0.4
candidate_release_1.0.4
into
develop
Overview
0
Commits
28
Pipelines
1
Changes
21
Merged
Mateusz Klimaszewski
requested to merge
candidate_release_1.0.4
into
develop
3 years ago
Overview
0
Commits
28
Pipelines
1
Changes
2
Expand
0
0
Merge request reports
Viewing commit
9c283e8c
Prev
Next
Show latest version
2 files
+
6
−
5
Expand all files
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
9c283e8c
Fix embeddings mapping during the evaluation step.
· 9c283e8c
Mateusz Klimaszewski
authored
4 years ago
combo/data/api.py
+
3
−
2
Options
@@ -55,6 +55,7 @@ def sentence2conllu(sentence: Sentence, keep_semrel: bool = True) -> conllu.Toke
# Remove semrel to have default conllu format.
if
not
keep_semrel
:
del
token_dict
[
"
semrel
"
]
del
token_dict
[
"
embeddings
"
]
tokens
.
append
(
token_dict
)
# Range tokens must be tuple not list, this is conllu library requirement
for
t
in
tokens
:
@@ -84,10 +85,10 @@ def conllu2sentence(conllu_sentence: conllu.TokenList,
if
sentence_embedding
is
None
:
sentence_embedding
=
[]
tokens
=
[]
for
idx
,
token
in
enumerate
(
conllu_sentence
.
tokens
)
:
for
token
in
conllu_sentence
.
tokens
:
tokens
.
append
(
Token
(
**
token
,
embeddings
=
embeddings
[
idx
]
**
token
,
embeddings
=
embeddings
[
token
[
"
id
"
]
]
)
)
return
Sentence
(