feat(weibo.py): update weibo.py
Browse files
weibo.py
CHANGED
@@ -30,7 +30,6 @@ _URLS = {
|
|
30 |
"test": _URL + "data/test.char.bmes",
|
31 |
}
|
32 |
|
33 |
-
|
34 |
class WeiboNamedEntities(datasets.GeneratorBasedBuilder):
|
35 |
VERSION = datasets.Version("1.0.0")
|
36 |
|
@@ -114,7 +113,6 @@ class WeiboNamedEntities(datasets.GeneratorBasedBuilder):
|
|
114 |
for line in f:
|
115 |
if len(line.strip()) == 0:
|
116 |
if len(example["text"]) > 0:
|
117 |
-
example["text"] = "".join(example["text"])
|
118 |
yield _id, example
|
119 |
example = self._default_example()
|
120 |
_id += 1
|
@@ -127,5 +125,4 @@ class WeiboNamedEntities(datasets.GeneratorBasedBuilder):
|
|
127 |
example["text"].append(char)
|
128 |
example["labels"].append(label)
|
129 |
if len(example["text"]) > 0:
|
130 |
-
example["text"] = "".join(example["text"])
|
131 |
yield _id, example
|
|
|
30 |
"test": _URL + "data/test.char.bmes",
|
31 |
}
|
32 |
|
|
|
33 |
class WeiboNamedEntities(datasets.GeneratorBasedBuilder):
|
34 |
VERSION = datasets.Version("1.0.0")
|
35 |
|
|
|
113 |
for line in f:
|
114 |
if len(line.strip()) == 0:
|
115 |
if len(example["text"]) > 0:
|
|
|
116 |
yield _id, example
|
117 |
example = self._default_example()
|
118 |
_id += 1
|
|
|
125 |
example["text"].append(char)
|
126 |
example["labels"].append(label)
|
127 |
if len(example["text"]) > 0:
|
|
|
128 |
yield _id, example
|