KoichiYasuoka commited on
Commit
e264969
1 Parent(s): b3aca41
Files changed (1) hide show
  1. ud.py +0 -1
ud.py CHANGED
@@ -29,7 +29,6 @@ class UniversalDependenciesPipeline(TokenClassificationPipeline):
29
  if [0 for i in h if i==0]!=[0]:
30
  m[:,0]+=numpy.where(m[:,0]==numpy.nanmax(m[[i for i,j in enumerate(h) if j==0],0]),0,numpy.nan)
31
  m[[i for i,j in enumerate(h) if j==0]]+=[0 if i==0 or j==0 else numpy.nan for i,j in enumerate(h)]
32
- m[[i for i,j in enumerate(h) if j==0],:]+=[0 if i==0 or j==0 else numpy.nan for i,j in enumerate(h)]
33
  h=ufal.chu_liu_edmonds.chu_liu_edmonds(m)[0]
34
  v=[(s,e) for s,e in model_output["offset_mapping"][0].tolist() if s<e]
35
  q=[self.model.config.id2label[p[i,j]].split("|") for i,j in enumerate(h)]
 
29
  if [0 for i in h if i==0]!=[0]:
30
  m[:,0]+=numpy.where(m[:,0]==numpy.nanmax(m[[i for i,j in enumerate(h) if j==0],0]),0,numpy.nan)
31
  m[[i for i,j in enumerate(h) if j==0]]+=[0 if i==0 or j==0 else numpy.nan for i,j in enumerate(h)]
 
32
  h=ufal.chu_liu_edmonds.chu_liu_edmonds(m)[0]
33
  v=[(s,e) for s,e in model_output["offset_mapping"][0].tolist() if s<e]
34
  q=[self.model.config.id2label[p[i,j]].split("|") for i,j in enumerate(h)]