Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cclutils
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arkadiusz Janz
cclutils
Commits
e5564824
Commit
e5564824
authored
Jun 22, 2020
by
Arkadiusz Janz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bad indentation error fixed
parent
260cf2b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
cclutils/_base.py
cclutils/_base.py
+8
-10
setup.py
setup.py
+1
-1
No files found.
cclutils/_base.py
View file @
e5564824
...
...
@@ -162,21 +162,21 @@ def get_tagset(tagset):
def
read_chunks_it
(
filepath
,
tagset
=
'nkjp'
):
""" Returns a iterable chunk generator.
""" Returns a iterable chunk generator.
Args:
filepath: a path to CCL file
tagset: the name of the tagset that is used in the document or a tagset object itself.
Returns:
a iterable chunk generator.
a
n
iterable chunk generator.
"""
tagset
=
get_tagset
(
tagset
)
reader
=
corpus2
.
TokenReader_create_path_reader
(
'ccl'
,
tagset
,
filepath
)
while
True
:
chunk
=
reader
.
get_next_chunk
()
if
not
chunk
:
break
yield
chunk
...
...
@@ -190,14 +190,14 @@ def read_sentences_it(filepath, tagset='nkjp'):
Args:
filepath: a path to CCL file
tagset: the name of the tagset that is used in the document or a tagset object itself.
Returns:
a iterable sentence generator.
"""
tagset
=
get_tagset
(
tagset
)
reader
=
corpus2
.
TokenReader_create_path_reader
(
'ccl'
,
tagset
,
filepath
)
while
True
:
sentence
=
reader
.
get_next_sentence
()
...
...
@@ -205,6 +205,4 @@ def read_sentences_it(filepath, tagset='nkjp'):
break
yield
sentence
del
reader
del
reader
setup.py
View file @
e5564824
...
...
@@ -6,7 +6,7 @@ setup(
author
=
'Arkadiusz Janz, Anna Gut, Dominik Kaszewski'
,
description
=
'''A convenient API based on Corpus2 library for analyzing textual
corpora in CCL format.'''
,
version
=
'1.0.
1
'
,
version
=
'1.0.
2
'
,
packages
=
[
'cclutils'
],
zip_safe
=
False
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment