Update fdner.py
Browse files
fdner.py
CHANGED
|
@@ -73,14 +73,30 @@ class fdner(datasets.GeneratorBasedBuilder):
|
|
| 73 |
datasets.features.ClassLabel(
|
| 74 |
names=[
|
| 75 |
"O",
|
| 76 |
-
"B-
|
| 77 |
-
"I-
|
| 78 |
-
"B-
|
| 79 |
-
"I-
|
| 80 |
-
"B-
|
| 81 |
-
"I-
|
| 82 |
-
"B-
|
| 83 |
-
"I-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
]
|
| 85 |
)
|
| 86 |
),
|
|
@@ -127,7 +143,7 @@ class fdner(datasets.GeneratorBasedBuilder):
|
|
| 127 |
# conll2003 tokens are space separated
|
| 128 |
splits = line.split(" ")
|
| 129 |
tokens.append(splits[0])
|
| 130 |
-
ner_tags.append(splits[
|
| 131 |
# last example
|
| 132 |
yield guid, {
|
| 133 |
"id": str(guid),
|
|
|
|
| 73 |
datasets.features.ClassLabel(
|
| 74 |
names=[
|
| 75 |
"O",
|
| 76 |
+
"B-EN",
|
| 77 |
+
"I-EN",
|
| 78 |
+
"B-STRUC",
|
| 79 |
+
"I-STRUC",
|
| 80 |
+
"B-CHA",
|
| 81 |
+
"I-CHA",
|
| 82 |
+
"B-KIND",
|
| 83 |
+
"I-KIND",
|
| 84 |
+
"B-ADV",
|
| 85 |
+
"I-ADV",
|
| 86 |
+
"B-DISA",
|
| 87 |
+
"I-DISA",
|
| 88 |
+
"B-METH",
|
| 89 |
+
"I-METH",
|
| 90 |
+
"B-NUM",
|
| 91 |
+
"I-NUM",
|
| 92 |
+
"B-PRO",
|
| 93 |
+
"I-PRO",
|
| 94 |
+
"B-THE",
|
| 95 |
+
"I-THE",
|
| 96 |
+
"B-DEF",
|
| 97 |
+
"I-DEF",
|
| 98 |
+
"B-FUC",
|
| 99 |
+
"I-FUC",
|
| 100 |
]
|
| 101 |
)
|
| 102 |
),
|
|
|
|
| 143 |
# conll2003 tokens are space separated
|
| 144 |
splits = line.split(" ")
|
| 145 |
tokens.append(splits[0])
|
| 146 |
+
ner_tags.append(splits[1].rstrip())
|
| 147 |
# last example
|
| 148 |
yield guid, {
|
| 149 |
"id": str(guid),
|