Skip to content

Commit

Permalink
#442 fixed implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Feb 18, 2023
1 parent 37157c4 commit 18edb24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions arekit/contrib/source/sentinerel/folding/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ def create_fixed_folding(file, limit=None):
def _read_train_test(f):
parts = []
for line in f.readlines():
if isinstance(line, bytes):
line = line.decode('utf-8')
parts.append(line.strip().split(','))
return parts[0], parts[1]
2 changes: 1 addition & 1 deletion arekit/contrib/source/sentinerel/io_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def read_dataset_split(version=DEFAULT_VERSION, docs_limit=None):
`test` and `training` part:
https://github.com/nicolay-r/SentiNEREL-attitude-extraction
"""
return ZipArchiveUtils.read_from_zip(
return SentiNerelIOUtils.read_from_zip(
inner_path=join(SentiNerelIOUtils.inner_root, "split_fixed.txt"),
process_func=lambda f: SentiNERELFoldingFactory.create_fixed_folding(file=f, limit=docs_limit),
version=version)
Expand Down

0 comments on commit 18edb24

Please sign in to comment.