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
!19
Release 1.0.0b2.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Release 1.0.0b2.
config_package
into
develop
Overview
0
Commits
4
Pipelines
1
Changes
13
Merged
Mateusz Klimaszewski
requested to merge
config_package
into
develop
4 years ago
Overview
0
Commits
4
Pipelines
1
Changes
13
Expand
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
6943a267
4 commits,
4 years ago
13 files
+
68
−
72
Expand all files
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
combo/data/dataset.py
+
4
−
1
Options
import
copy
import
logging
import
pathlib
from
typing
import
Union
,
List
,
Dict
,
Iterable
,
Optional
,
Any
,
Tuple
import
conllu
@@ -79,7 +80,9 @@ class UniversalDependenciesDatasetReader(allen_data.DatasetReader):
file_path
=
[
file_path
]
if
len
(
file_path
.
split
(
"
,
"
))
==
0
else
file_path
.
split
(
"
,
"
)
for
conllu_file
in
file_path
:
with
open
(
conllu_file
,
"
r
"
)
as
file
:
file
=
pathlib
.
Path
(
conllu_file
)
assert
conllu_file
and
file
.
exists
(),
f
"
File with path
'
{
conllu_file
}
'
does not exists!
"
with
file
.
open
(
"
r
"
):
for
annotation
in
conllu
.
parse_incr
(
file
,
fields
=
self
.
fields
,
field_parsers
=
self
.
field_parsers
):
yield
self
.
text_to_instance
(
annotation
)