Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
Manage
Activity
Members
Labels
Plan
Issues
4
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
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
Analysers
corpus2
Commits
84992ad4
Commit
84992ad4
authored
13 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
fix bug in corpus-get
parent
ec560597
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
corpus2tools/corpus-get
+3
-2
3 additions, 2 deletions
corpus2tools/corpus-get
with
3 additions
and
2 deletions
corpus2tools/corpus-get
+
3
−
2
View file @
84992ad4
...
...
@@ -21,11 +21,11 @@ def parse_range_info(s):
try
:
selection
.
add
(
int
(
elem
))
except
:
split
=
[
x
.
strip
()
for
x
in
elem
.
split
(
'
-
'
)]
split
=
[
int
(
x
.
strip
()
)
for
x
in
elem
.
split
(
'
-
'
)]
try
:
if
len
(
split
)
==
2
:
split
.
sort
()
for
x
in
xrange
(
int
(
split
[
0
]
)
,
int
(
split
[
1
]
)
+
1
):
for
x
in
xrange
(
split
[
0
],
split
[
1
]
+
1
):
selection
.
add
(
x
)
else
:
raise
...
...
@@ -98,6 +98,7 @@ def go():
reader
=
corpus2
.
TokenReader
.
create_path_reader
(
options
.
input_format
,
tagset
,
inpath
)
writer
=
corpus2
.
TokenWriter
.
create_stdout_writer
(
options
.
output_format
,
tagset
)
selection
=
{}
for
arg
in
args
[
1
:]:
if
'
:
'
in
arg
:
sp
=
arg
.
split
(
'
:
'
)
...
...
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