Corrected category lookup
Browse files
icelandic-error-corpus-IceEC.py
CHANGED
@@ -841,6 +841,8 @@ class IceEC(datasets.GeneratorBasedBuilder):
|
|
841 |
for line in f:
|
842 |
data = json.loads(line.strip())
|
843 |
if self.config.level is not None:
|
844 |
-
errors = [
|
|
|
|
|
845 |
data["errors"] = errors
|
846 |
yield data["idx"], data
|
|
|
841 |
for line in f:
|
842 |
data = json.loads(line.strip())
|
843 |
if self.config.level is not None:
|
844 |
+
errors = []
|
845 |
+
for word_errors in data["errors"]:
|
846 |
+
errors.append([ERROR_INFORMATION[e][self.config.level] for e in word_errors])
|
847 |
data["errors"] = errors
|
848 |
yield data["idx"], data
|