Datasets:
eduagarcia
commited on
Commit
•
08d39bb
1
Parent(s):
4e2de79
fix: Filter for ulysses data
Browse files- portuguese_benchmark.py +3 -0
portuguese_benchmark.py
CHANGED
@@ -365,6 +365,9 @@ def _conll_ner_generator(file_path: str, config: PTBenchmarkConfig):
|
|
365 |
for line in f:
|
366 |
if line == "" or line == "\n":
|
367 |
if tokens:
|
|
|
|
|
|
|
368 |
yield guid, {
|
369 |
"idx": guid,
|
370 |
"tokens": tokens,
|
|
|
365 |
for line in f:
|
366 |
if line == "" or line == "\n":
|
367 |
if tokens:
|
368 |
+
# Filter for Ulysses empty data
|
369 |
+
if len(tokens) == 1 and tokens[0] == '.':
|
370 |
+
continue
|
371 |
yield guid, {
|
372 |
"idx": guid,
|
373 |
"tokens": tokens,
|