Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
n<1K
Language Creators:
found
Annotations Creators:
found
Source Datasets:
original
Tags:
License:
system HF staff commited on
Commit
ee0dc6e
1 Parent(s): c644eef

Update files from the datasets library (from 1.4.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.4.0

Files changed (1) hide show
  1. onestop_english.py +6 -4
onestop_english.py CHANGED
@@ -16,12 +16,14 @@
16
 
17
  from __future__ import absolute_import, division, print_function
18
 
19
- import logging
20
  import os
21
 
22
  import datasets
23
 
24
 
 
 
 
25
  _CITATION = """\
26
  @inproceedings{vajjala-lucic-2018-onestopenglish,
27
  title = {OneStopEnglish corpus: A new corpus for automatic readability assessment and text simplification},
@@ -92,7 +94,7 @@ class OnestopEnglish(datasets.GeneratorBasedBuilder):
92
  text = myfile.read().strip()
93
  ele_samples.append(text)
94
  except Exception as e:
95
- logging.info("Error with:", os.path.join(dir_path, f), e)
96
 
97
  int_samples = []
98
  dir_path = os.path.join(data_dir, "Int-Txt")
@@ -103,7 +105,7 @@ class OnestopEnglish(datasets.GeneratorBasedBuilder):
103
  text = myfile.read().strip()
104
  int_samples.append(text)
105
  except Exception as e:
106
- logging.info("Error with:", os.path.join(dir_path, f), e)
107
 
108
  adv_samples = []
109
  dir_path = os.path.join(data_dir, "Adv-Txt")
@@ -114,7 +116,7 @@ class OnestopEnglish(datasets.GeneratorBasedBuilder):
114
  text = myfile.read().strip()
115
  adv_samples.append(text)
116
  except Exception as e:
117
- logging.info("Error with:", os.path.join(dir_path, f), e)
118
 
119
  train_samples = ele_samples + int_samples + adv_samples
120
  train_labels = (["ele"] * len(ele_samples)) + (["int"] * len(int_samples)) + (["adv"] * len(adv_samples))
 
16
 
17
  from __future__ import absolute_import, division, print_function
18
 
 
19
  import os
20
 
21
  import datasets
22
 
23
 
24
+ logger = datasets.logging.get_logger(__name__)
25
+
26
+
27
  _CITATION = """\
28
  @inproceedings{vajjala-lucic-2018-onestopenglish,
29
  title = {OneStopEnglish corpus: A new corpus for automatic readability assessment and text simplification},
 
94
  text = myfile.read().strip()
95
  ele_samples.append(text)
96
  except Exception as e:
97
+ logger.info("Error with:", os.path.join(dir_path, f), e)
98
 
99
  int_samples = []
100
  dir_path = os.path.join(data_dir, "Int-Txt")
 
105
  text = myfile.read().strip()
106
  int_samples.append(text)
107
  except Exception as e:
108
+ logger.info("Error with:", os.path.join(dir_path, f), e)
109
 
110
  adv_samples = []
111
  dir_path = os.path.join(data_dir, "Adv-Txt")
 
116
  text = myfile.read().strip()
117
  adv_samples.append(text)
118
  except Exception as e:
119
+ logger.info("Error with:", os.path.join(dir_path, f), e)
120
 
121
  train_samples = ele_samples + int_samples + adv_samples
122
  train_labels = (["ele"] * len(ele_samples)) + (["int"] * len(int_samples)) + (["adv"] * len(adv_samples))