KoichiYasuoka
commited on
Commit
•
d80634a
1
Parent(s):
3ac2c69
bug fix
Browse files
ud.py
CHANGED
@@ -40,6 +40,8 @@ class UniversalDependenciesPipeline(TokenClassificationPipeline):
|
|
40 |
z={"a":"ァ","i":"ィ","u":"ゥ","e":"ェ","o":"ォ","k":"ㇰ","s":"ㇱ","t":"ㇳ","n":"ㇴ","h":"ㇷ","m":"ㇺ","r":"ㇽ","p":"ㇷ゚"}
|
41 |
f=-1
|
42 |
for i,(s,e,c) in reversed(list(enumerate(v))):
|
|
|
|
|
43 |
w,x=[j for j in t[s:e]],""
|
44 |
if i>0 and s<v[i-1][1]:
|
45 |
w[0]=z[c[0]] if c[0] in z else "ッ"
|
|
|
40 |
z={"a":"ァ","i":"ィ","u":"ゥ","e":"ェ","o":"ォ","k":"ㇰ","s":"ㇱ","t":"ㇳ","n":"ㇴ","h":"ㇷ","m":"ㇺ","r":"ㇽ","p":"ㇷ゚"}
|
41 |
f=-1
|
42 |
for i,(s,e,c) in reversed(list(enumerate(v))):
|
43 |
+
if t[s]=="\u309a":
|
44 |
+
s-=1
|
45 |
w,x=[j for j in t[s:e]],""
|
46 |
if i>0 and s<v[i-1][1]:
|
47 |
w[0]=z[c[0]] if c[0] in z else "ッ"
|