From 164652697baf94f5e6a465a221f1212c0a8d4f65 Mon Sep 17 00:00:00 2001 From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com> Date: Wed, 13 Jan 2021 15:35:54 +0100 Subject: [PATCH 1/2] Fix dataset reader. --- combo/data/dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/combo/data/dataset.py b/combo/data/dataset.py index 9aabe19..870659f 100644 --- a/combo/data/dataset.py +++ b/combo/data/dataset.py @@ -82,8 +82,8 @@ class UniversalDependenciesDatasetReader(allen_data.DatasetReader): for conllu_file in file_path: 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): + with file.open("r") as f: + for annotation in conllu.parse_incr(f, fields=self.fields, field_parsers=self.field_parsers): yield self.text_to_instance(annotation) @overrides -- GitLab From c053d5eed38e8d0cb0d92a76f2c4601702e8b668 Mon Sep 17 00:00:00 2001 From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com> Date: Wed, 13 Jan 2021 15:36:20 +0100 Subject: [PATCH 2/2] Release 1.0.0b4. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0779eaf..0c8c371 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ REQUIREMENTS = [ setup( name='combo', - version='1.0.0b3', + version='1.0.0b4', author='Mateusz Klimaszewski', author_email='M.Klimaszewski@ii.pw.edu.pl', install_requires=REQUIREMENTS, -- GitLab