KoichiYasuoka
commited on
Commit
•
a09d0ab
1
Parent(s):
9312edf
bug fix
Browse files
maker.py
CHANGED
@@ -22,7 +22,7 @@ class UDgoeswithDataset(object):
|
|
22 |
for j in range(1,len(v[i])):
|
23 |
c.insert(i+1,[c[i][0],"_","_","X","_","_",c[i][0],"goeswith","_","_"])
|
24 |
y=["0"]+[t[0] for t in c]
|
25 |
-
h=[
|
26 |
p,v=[t[3]+"|"+t[5]+"|"+t[7] for t in c],sum(v,[])
|
27 |
self.ids.append([cls]+v+[sep])
|
28 |
self.tags.append([dep]+p+[dep])
|
|
|
22 |
for j in range(1,len(v[i])):
|
23 |
c.insert(i+1,[c[i][0],"_","_","X","_","_",c[i][0],"goeswith","_","_"])
|
24 |
y=["0"]+[t[0] for t in c]
|
25 |
+
h=[i if t[6]=="0" else y.index(t[6]) for i,t in enumerate(c,1)]
|
26 |
p,v=[t[3]+"|"+t[5]+"|"+t[7] for t in c],sum(v,[])
|
27 |
self.ids.append([cls]+v+[sep])
|
28 |
self.tags.append([dep]+p+[dep])
|