Skip to content

Commit 1218777

Browse files
committed
Update code
1 parent c883542 commit 1218777

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

docker_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ wunsen==0.0.3
3333
khanaa==0.0.6
3434
spacy_thai==0.7.1
3535
esupar==1.3.8
36+
ufal.chu-liu-edmonds==1.0.2

docs/notes/installation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ where ``extras`` can be
3434
- ``nlpo3`` (to support nlpo3 engine)
3535
- ``spacy_thai`` (to support spacy_thai engine)
3636
- ``esupar`` (to support esupar engine)
37+
- ``transformers_ud`` (to support transformers_ud engine)
3738
- ``dependency_parsing`` (to support dependency parsing with all engine)
3839
- ``full`` (install everything)
3940

pythainlp/parse/transformers_ud.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def __init__(self, model: str="KoichiYasuoka/deberta-base-thai-ud-head") -> None
3939
s=AutoConfig.from_pretrained(cached_file(model,"tagger/config.json"))
4040
t=x(cached_file(model,"tagger/pytorch_model.bin"),config=s)
4141
self.deprel=TokenClassificationPipeline(
42-
model=d
42+
model=d,
4343
tokenizer=self.tokenizer,
4444
aggregation_strategy="simple"
4545
)
4646
self.tagger=TokenClassificationPipeline(
47-
model=t
47+
model=t,
4848
tokenizer=self.tokenizer
4949
)
5050

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,13 @@
8383
"thai_nner": ["thai_nner"],
8484
"esupar": ["esupar>=1.3.8", "numpy"],
8585
"spacy_thai": ["spacy_thai>=0.7.1"],
86+
"transformers_ud": [
87+
"ufal.chu-liu-edmonds>=1.0.2"
88+
],
8689
"dependency_parsing": [
8790
"esupar>=1.3.8",
8891
"spacy_thai>=0.7.1",
92+
"ufal.chu-liu-edmonds>=1.0.2"
8993
],
9094
"full": [
9195
"PyYAML>=5.3.1",
@@ -117,6 +121,7 @@
117121
"wunsen>=0.0.3",
118122
"spacy_thai>=0.7.1",
119123
"esupar>=1.3.8",
124+
"ufal.chu-liu-edmonds>=1.0.2",
120125
],
121126
}
122127

0 commit comments

Comments
 (0)