Datasets:
Tasks:
Token Classification
Sub-tasks:
named-entity-recognition
Languages:
English
Size:
1K<n<10K
License:
Update ner.py
Browse files
ner.py
CHANGED
@@ -2,10 +2,7 @@ import datasets
|
|
2 |
|
3 |
logger = datasets.logging.get_logger(__name__)
|
4 |
|
5 |
-
_URL = "https://raw.githubusercontent.com/Kriyansparsana/demorepo/main/"
|
6 |
-
_TRAINING_FILE = "Indian_dataset_wnut_train.conll"
|
7 |
-
# _DEV_FILE = "indian_dataset.conll"
|
8 |
-
_TEST_FILE = "emerging.test.annotated"
|
9 |
|
10 |
class indian_namesConfig(datasets.BuilderConfig):
|
11 |
"""The WNUT 17 Emerging Entities Dataset."""
|
@@ -38,16 +35,8 @@ class indian_names(datasets.GeneratorBasedBuilder):
|
|
38 |
"O",
|
39 |
"B-corporation",
|
40 |
"I-corporation",
|
41 |
-
"B-creative-work",
|
42 |
-
"I-creative-work",
|
43 |
-
"B-group",
|
44 |
-
"I-group",
|
45 |
-
"B-location",
|
46 |
-
"I-location",
|
47 |
"B-person",
|
48 |
-
"I-person"
|
49 |
-
"B-product",
|
50 |
-
"I-product",
|
51 |
]
|
52 |
)
|
53 |
),
|
@@ -59,16 +48,12 @@ class indian_names(datasets.GeneratorBasedBuilder):
|
|
59 |
def _split_generators(self, dl_manager):
|
60 |
"""Returns SplitGenerators."""
|
61 |
urls_to_download = {
|
62 |
-
"train": f"{_URL}
|
63 |
-
# "dev": f"{_URL}{_DEV_FILE}",
|
64 |
-
"test": f"{_URL}{_TEST_FILE}",
|
65 |
}
|
66 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
67 |
|
68 |
return [
|
69 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
70 |
-
# datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
71 |
-
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
72 |
]
|
73 |
|
74 |
def _generate_examples(self, filepath):
|
|
|
2 |
|
3 |
logger = datasets.logging.get_logger(__name__)
|
4 |
|
5 |
+
_URL = "https://raw.githubusercontent.com/Kriyansparsana/demorepo/main/train.txt"
|
|
|
|
|
|
|
6 |
|
7 |
class indian_namesConfig(datasets.BuilderConfig):
|
8 |
"""The WNUT 17 Emerging Entities Dataset."""
|
|
|
35 |
"O",
|
36 |
"B-corporation",
|
37 |
"I-corporation",
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
"B-person",
|
39 |
+
"I-person"
|
|
|
|
|
40 |
]
|
41 |
)
|
42 |
),
|
|
|
48 |
def _split_generators(self, dl_manager):
|
49 |
"""Returns SplitGenerators."""
|
50 |
urls_to_download = {
|
51 |
+
"train": f"{_URL}",
|
|
|
|
|
52 |
}
|
53 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
54 |
|
55 |
return [
|
56 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
|
|
|
|
57 |
]
|
58 |
|
59 |
def _generate_examples(self, filepath):
|