Commit
•
cf1b385
1
Parent(s):
9892903
script improved
Browse files
README.md
CHANGED
@@ -46,6 +46,9 @@ class UDgoeswith(object):
|
|
46 |
for i in range(1,m.shape[0]):
|
47 |
m[i,0],m[i,i],p[i,0]=m[i,i],numpy.nan,p[i,i]
|
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):
|
|
|
46 |
for i in range(1,m.shape[0]):
|
47 |
m[i,0],m[i,i],p[i,0]=m[i,i],numpy.nan,p[i,i]
|
48 |
h=ufal.chu_liu_edmonds.chu_liu_edmonds(m)[0]
|
49 |
+
if [0 for i in h if i==0]!=[0]:
|
50 |
+
m[:,0]+=numpy.where(m[:,0]<numpy.nanmax(m[:,0]),numpy.nan,0)
|
51 |
+
h=ufal.chu_liu_edmonds.chu_liu_edmonds(m)[0]
|
52 |
u="# text = "+text+"\n"
|
53 |
v=[(s,e) for s,e in w["offset_mapping"] if s<e]
|
54 |
for i,(s,e) in enumerate(v,1):
|