KoichiYasuoka
commited on
Commit
•
f350fce
1
Parent(s):
98f0e2b
script improved
Browse files
README.md
CHANGED
@@ -43,6 +43,9 @@ class UDgoeswith(object):
|
|
43 |
for i in range(1,m.shape[0]):
|
44 |
m[i,0],m[i,i],p[i,0]=m[i,i],numpy.nan,p[i,i]
|
45 |
h=ufal.chu_liu_edmonds.chu_liu_edmonds(m)[0]
|
|
|
|
|
|
|
46 |
u="# text = "+text+"\n"
|
47 |
v=[(s,e) for s,e in w["offset_mapping"] if s<e]
|
48 |
for i,(s,e) in enumerate(v,1):
|
|
|
43 |
for i in range(1,m.shape[0]):
|
44 |
m[i,0],m[i,i],p[i,0]=m[i,i],numpy.nan,p[i,i]
|
45 |
h=ufal.chu_liu_edmonds.chu_liu_edmonds(m)[0]
|
46 |
+
if [0 for i in h if i==0]!=[0]:
|
47 |
+
m[:,0]+=numpy.where(m[:,0]<numpy.nanmax(m[:,0]),numpy.nan,0)
|
48 |
+
h=ufal.chu_liu_edmonds.chu_liu_edmonds(m)[0]
|
49 |
u="# text = "+text+"\n"
|
50 |
v=[(s,e) for s,e in w["offset_mapping"] if s<e]
|
51 |
for i,(s,e) in enumerate(v,1):
|