KoichiYasuoka
commited on
Commit
•
8f0399e
1
Parent(s):
5a68911
bug fix
Browse files
README.md
CHANGED
@@ -49,7 +49,7 @@ class TaggerPipeline(TokenClassificationPipeline):
|
|
49 |
d=super().__call__(text)
|
50 |
if len(d)>0 and ("start" not in d[0] or d[0]["start"]==None):
|
51 |
import tokenizations
|
52 |
-
v=[x["word"] for x in d]
|
53 |
a2b,b2a=tokenizations.get_alignments(v,text)
|
54 |
for i,t in enumerate(a2b):
|
55 |
s,e=(0,0) if t==[] else (t[0],t[-1]+1)
|
|
|
49 |
d=super().__call__(text)
|
50 |
if len(d)>0 and ("start" not in d[0] or d[0]["start"]==None):
|
51 |
import tokenizations
|
52 |
+
v=[x["word"].replace(" ","") for x in d]
|
53 |
a2b,b2a=tokenizations.get_alignments(v,text)
|
54 |
for i,t in enumerate(a2b):
|
55 |
s,e=(0,0) if t==[] else (t[0],t[-1]+1)
|