Sam
commited on
Commit
·
68d65fd
1
Parent(s):
1e12cfb
Update from sam
Browse files
argument_mining_dataloader.py
CHANGED
@@ -69,6 +69,8 @@ class ArguementMiningCL2017(datasets.GeneratorBasedBuilder):
|
|
69 |
description=_DESCRIPTION,
|
70 |
features=datasets.Features(
|
71 |
{
|
|
|
|
|
72 |
"chunk_tags":datasets.Sequence(
|
73 |
datasets.features.ClassLabel(
|
74 |
names=[
|
@@ -121,10 +123,10 @@ class ArguementMiningCL2017(datasets.GeneratorBasedBuilder):
|
|
121 |
# cl2017 tokens are space separated
|
122 |
line=line.strip('\n')
|
123 |
splits = line.split("\t")
|
124 |
-
print(splits)
|
125 |
tokens.append(splits[0])
|
126 |
chunk_tags.append(splits[1])
|
127 |
-
print({"id": str(guid),"tokens": tokens,"chunk_tags": chunk_tags,})
|
128 |
# last example
|
129 |
yield guid, {
|
130 |
"id": str(guid),
|
|
|
69 |
description=_DESCRIPTION,
|
70 |
features=datasets.Features(
|
71 |
{
|
72 |
+
"id": datasets.Value("string"),
|
73 |
+
"tokens": datasets.Sequence(datasets.Value("string")),
|
74 |
"chunk_tags":datasets.Sequence(
|
75 |
datasets.features.ClassLabel(
|
76 |
names=[
|
|
|
123 |
# cl2017 tokens are space separated
|
124 |
line=line.strip('\n')
|
125 |
splits = line.split("\t")
|
126 |
+
#print(splits)
|
127 |
tokens.append(splits[0])
|
128 |
chunk_tags.append(splits[1])
|
129 |
+
#print({"id": str(guid),"tokens": tokens,"chunk_tags": chunk_tags,})
|
130 |
# last example
|
131 |
yield guid, {
|
132 |
"id": str(guid),
|