spaCy-Thai
Tokenizer, POS-tagger, and dependency-parser for Thai language, working on Universal Dependencies.
Basic Usage
>>> import spacy_thai
>>> nlp=spacy_thai.load()
>>> doc=nlp("แผนกนี้กำลังเผชิญกับความท้าทายใหม่")
>>> for t in doc:
... print("\t".join([str(t.i+1),t.orth_,t.lemma_,t.pos_,t.tag_,"_",str(0 if t.head==t else t.head.i+1),t.dep_,"_","_" if t.whitespace_ else "SpaceAfter=No"]))
...
1 แผนก แผนก NOUN NCMN _ 4 nsubj _ SpaceAfter=No
2 นี้ นี้ DET DDAC _ 1 det _ SpaceAfter=No
3 กำลัง กำลัง AUX XVBM _ 4 aux _ SpaceAfter=No
4 เผชิญ เผชิญ VERB VSTA _ 0 ROOT _ SpaceAfter=No
5 กับ กับ ADP RPRE _ 6 case _ SpaceAfter=No
6 ความ ความ PART FIXN _ 4 obl _ SpaceAfter=No
7 ท้าทาย ท้าทาย VERB VACT _ 6 acl _ SpaceAfter=No
8 ใหม่ ใหม่ ADV ADVN _ 7 advmod _ SpaceAfter=No
>>> import deplacy
>>> deplacy.render(doc,WordRight=True)
nsubj ╔════════>╔═ NOUN แผนก
det ║ ╚> DET นี้
aux ║ ╔════════> AUX กำลัง
ROOT ╚═╚═╔═══════ VERB เผชิญ
case ║ ╔════> ADP กับ
obl ╚>╚═╔═══ PART ความ
acl ╚>╔═ VERB ท้าทาย
advmod ╚> ADV ใหม่
Installation for Linux
pip3 install spacy_thai --user
Installation for Cygwin
Make sure to get python37-devel python37-pip python37-numpy python37-cython gcc-g++, and then:
pip3.7 install spacy_thai
Installation for Google Colaboratory
!pip install spacy_thai
Try notebook.
Metadata
Release files for spacy-thai 0.7.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spacy_thai-0.7.8-py3-none-any.whl | Python 3 | none | any | Details for spacy_thai-0.7.8-py3-none-any.whl |
Release files / spacy_thai-0.7.8-py3-none-any.whl
| Download URL | spacy_thai-0.7.8-py3-none-any.whl |
|---|---|
| Size | 15.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3d9b20f9d02a506f638c4d54712b938cf29d078fbe3228d85f2b7f1c7c05bd2
|
|
BLAKE2b-256 checksum How to use checksums |
d10583d46cea4cb48387f50a027a018eb3fbd31650b7b2ae07b024e7786436b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Security for spacy-thai 0.7.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.