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
bdd9d5bb
Commit
bdd9d5bb
authored
4 years ago
by
Mateusz Klimaszewski
Committed by
Mateusz Klimaszewski
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix mapping and path.
parent
d711c60f
2 merge requests
!9
Enhanced dependency parsing develop to master
,
!8
Enhanced dependency parsing
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
combo/data/api.py
+4
-0
4 additions, 0 deletions
combo/data/api.py
scripts/train.py
+1
-1
1 addition, 1 deletion
scripts/train.py
with
5 additions
and
1 deletion
combo/data/api.py
+
4
−
0
View file @
bdd9d5bb
...
@@ -50,6 +50,10 @@ def sentence2conllu(sentence: Sentence, keep_semrel: bool = True) -> conllu.Toke
...
@@ -50,6 +50,10 @@ def sentence2conllu(sentence: Sentence, keep_semrel: bool = True) -> conllu.Toke
for
t
in
tokens
:
for
t
in
tokens
:
if
type
(
t
[
"
id
"
])
==
list
:
if
type
(
t
[
"
id
"
])
==
list
:
t
[
"
id
"
]
=
tuple
(
t
[
"
id
"
])
t
[
"
id
"
]
=
tuple
(
t
[
"
id
"
])
if
t
[
"
deps
"
]:
for
dep
in
t
[
"
deps
"
]:
if
type
(
dep
[
1
])
==
list
:
dep
[
1
]
=
tuple
(
dep
[
1
])
return
_TokenList
(
tokens
=
tokens
,
return
_TokenList
(
tokens
=
tokens
,
metadata
=
sentence
.
metadata
)
metadata
=
sentence
.
metadata
)
...
...
This diff is collapsed.
Click to expand it.
scripts/train.py
+
1
−
1
View file @
bdd9d5bb
...
@@ -135,7 +135,7 @@ def run(_):
...
@@ -135,7 +135,7 @@ def run(_):
embeddings_dir
=
FLAGS
.
embeddings_dir
embeddings_dir
=
FLAGS
.
embeddings_dir
embeddings_file
=
None
embeddings_file
=
None
if
embeddings_dir
:
if
embeddings_dir
:
embeddings_dir
=
embeddings_dir
/
language
embeddings_dir
=
pathlib
.
Path
(
embeddings_dir
)
/
language
embeddings_file
=
[
f
for
f
in
embeddings_dir
.
iterdir
()
if
"
vectors
"
in
f
.
name
and
"
.vec.gz
"
in
f
.
name
]
embeddings_file
=
[
f
for
f
in
embeddings_dir
.
iterdir
()
if
"
vectors
"
in
f
.
name
and
"
.vec.gz
"
in
f
.
name
]
assert
len
(
embeddings_file
)
==
1
,
f
"
Couldn
'
t find embeddings file.
"
assert
len
(
embeddings_file
)
==
1
,
f
"
Couldn
'
t find embeddings file.
"
embeddings_file
=
embeddings_file
[
0
]
embeddings_file
=
embeddings_file
[
0
]
...
...
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