Datasets:
Tasks:
Token Classification
Sub-tasks:
named-entity-recognition
Languages:
Portuguese
Size:
n<1K
License:
Update files from the datasets library (from 1.4.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.4.0
harem.py
CHANGED
|
@@ -17,13 +17,15 @@
|
|
| 17 |
from __future__ import absolute_import, division, print_function
|
| 18 |
|
| 19 |
import json
|
| 20 |
-
import logging
|
| 21 |
import unicodedata
|
| 22 |
from typing import List, Tuple
|
| 23 |
|
| 24 |
import datasets
|
| 25 |
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
_CITATION = """
|
| 28 |
@inproceedings{santos2006harem,
|
| 29 |
title={Harem: An advanced ner evaluation contest for portuguese},
|
|
@@ -249,7 +251,7 @@ class HAREM(datasets.GeneratorBasedBuilder):
|
|
| 249 |
def _generate_examples(self, filepath, split):
|
| 250 |
""" Yields examples. """
|
| 251 |
|
| 252 |
-
|
| 253 |
|
| 254 |
with open(filepath, "r", encoding="utf-8") as f:
|
| 255 |
|
|
@@ -265,7 +267,7 @@ class HAREM(datasets.GeneratorBasedBuilder):
|
|
| 265 |
|
| 266 |
def set_label(index, tag):
|
| 267 |
if tags[index] != "O":
|
| 268 |
-
|
| 269 |
"Overwriting tag %s at position %s to %s",
|
| 270 |
tags[index],
|
| 271 |
index,
|
|
|
|
| 17 |
from __future__ import absolute_import, division, print_function
|
| 18 |
|
| 19 |
import json
|
|
|
|
| 20 |
import unicodedata
|
| 21 |
from typing import List, Tuple
|
| 22 |
|
| 23 |
import datasets
|
| 24 |
|
| 25 |
|
| 26 |
+
logger = datasets.logging.get_logger(__name__)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
_CITATION = """
|
| 30 |
@inproceedings{santos2006harem,
|
| 31 |
title={Harem: An advanced ner evaluation contest for portuguese},
|
|
|
|
| 251 |
def _generate_examples(self, filepath, split):
|
| 252 |
""" Yields examples. """
|
| 253 |
|
| 254 |
+
logger.info("⏳ Generating examples from = %s", filepath)
|
| 255 |
|
| 256 |
with open(filepath, "r", encoding="utf-8") as f:
|
| 257 |
|
|
|
|
| 267 |
|
| 268 |
def set_label(index, tag):
|
| 269 |
if tags[index] != "O":
|
| 270 |
+
logger.warning(
|
| 271 |
"Overwriting tag %s at position %s to %s",
|
| 272 |
tags[index],
|
| 273 |
index,
|