KoichiYasuoka
commited on
Commit
•
0aa1640
1
Parent(s):
fbcc304
spacy-alignments
Browse files
README.md
CHANGED
@@ -51,7 +51,7 @@ class TaggerPipeline(TokenClassificationPipeline):
|
|
51 |
def __call__(self,text):
|
52 |
d=super().__call__(text)
|
53 |
if len(d)>0 and ("start" not in d[0] or d[0]["start"]==None):
|
54 |
-
import tokenizations
|
55 |
v=[x["word"].replace(" ","") for x in d]
|
56 |
a2b,b2a=tokenizations.get_alignments(v,text)
|
57 |
for i,t in enumerate(a2b):
|
@@ -113,4 +113,4 @@ nlp=TransformersSlowUD("KoichiYasuoka/deberta-large-japanese-unidic-ud-head")
|
|
113 |
print(nlp("全学年にわたって小学校の国語の教科書に挿し絵が用いられている"))
|
114 |
```
|
115 |
|
116 |
-
[fugashi](https://pypi.org/project/fugashi) [unidic-lite](https://pypi.org/project/unidic-lite) [
|
51 |
def __call__(self,text):
|
52 |
d=super().__call__(text)
|
53 |
if len(d)>0 and ("start" not in d[0] or d[0]["start"]==None):
|
54 |
+
import spacy_alignments as tokenizations
|
55 |
v=[x["word"].replace(" ","") for x in d]
|
56 |
a2b,b2a=tokenizations.get_alignments(v,text)
|
57 |
for i,t in enumerate(a2b):
|
113 |
print(nlp("全学年にわたって小学校の国語の教科書に挿し絵が用いられている"))
|
114 |
```
|
115 |
|
116 |
+
[fugashi](https://pypi.org/project/fugashi) [unidic-lite](https://pypi.org/project/unidic-lite) [spacy-alignments](https://pypi.org/project/spacy-alignments) and [ufal.chu-liu-edmonds](https://pypi.org/project/ufal.chu-liu-edmonds/) required.
|