minor fixes and cleaning
Browse files- wikiner.py +11 -5
wikiner.py
CHANGED
@@ -18,14 +18,20 @@ import logging
|
|
18 |
import datasets
|
19 |
|
20 |
|
21 |
-
_CITATION = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
_DESCRIPTION = """Dataset used to train a NER model"""
|
24 |
|
25 |
-
#_URL = "https://github.com/NazaGara/betoNER/tree/main/data/wikiner/"
|
26 |
_URL = "https://raw.githubusercontent.com/NazaGara/betoNER/main/data/wikiner/"
|
27 |
-
|
28 |
-
|
29 |
|
30 |
class WikinerConfig(datasets.BuilderConfig):
|
31 |
"""BuilderConfig"""
|
@@ -94,7 +100,7 @@ class Wikiner(datasets.GeneratorBasedBuilder):
|
|
94 |
|
95 |
def _generate_examples(self, filepath):
|
96 |
logging.info("⏳ Generating examples from = %s", filepath)
|
97 |
-
with open(filepath, encoding="utf-8") as f:
|
98 |
guid = 0
|
99 |
tokens = []
|
100 |
ner_tags = []
|
|
|
18 |
import datasets
|
19 |
|
20 |
|
21 |
+
_CITATION = """\
|
22 |
+
@inproceedings{,
|
23 |
+
title = "",
|
24 |
+
author = "Garagiola, Nazareno",
|
25 |
+
year = "2022",
|
26 |
+
url = ""
|
27 |
+
}
|
28 |
+
"""
|
29 |
|
30 |
_DESCRIPTION = """Dataset used to train a NER model"""
|
31 |
|
|
|
32 |
_URL = "https://raw.githubusercontent.com/NazaGara/betoNER/main/data/wikiner/"
|
33 |
+
_TRAINING_FILE = "train.conllu"
|
34 |
+
|
35 |
|
36 |
class WikinerConfig(datasets.BuilderConfig):
|
37 |
"""BuilderConfig"""
|
|
|
100 |
|
101 |
def _generate_examples(self, filepath):
|
102 |
logging.info("⏳ Generating examples from = %s", filepath)
|
103 |
+
with open(filepath, encoding="utf-8") as f:
|
104 |
guid = 0
|
105 |
tokens = []
|
106 |
ner_tags = []
|