CKIPService
Web service for ckiplab/ckiptagger
Install / Use
/learn @jyhsu2000/CKIPServiceREADME
CKIP Service
Web service for ckiplab/ckiptagger
Preparation
- Download model files and put into
datafolder
Start service
- Start the service using
docker-compose
If you want to rebuild the image, adddocker-compose up -d--buildflag when startupdocker-compose up --build -d - Service is now on port
5005
Stop service
- Stop the service using
docker-composedocker-compose down
Endpoint
- Main
- method:
POST - route:
/ - parameter
sentence_list: sentence list for CKIP tagging, split multiple sentences by linebreak(\n)
- method:
Test CKIP Tagger
-
Send request using curl
curl -X POST localhost:5005 -F $'sentence_list=土地公有政策??還是土地婆有政策。.\n最多容納59,000個人,或5.9萬人,再多就不行了.這是環評的結論.' -
Get the response like the following one
<details> <summary>JSON Response</summary>
</details>{ "sentences": [ { "segments": [ { "word": "土地公有", "pos": "VH" }, { "word": "政策", "pos": "Na" }, { "word": "?", "pos": "QUESTIONCATEGORY" }, { "word": "?", "pos": "QUESTIONCATEGORY" }, { "word": "還是", "pos": "Caa" }, { "word": "土地", "pos": "Na" }, { "word": "婆", "pos": "Na" }, { "word": "有", "pos": "V_2" }, { "word": "政策", "pos": "Na" }, { "word": "。", "pos": "PERIODCATEGORY" }, { "word": ".\\n", "pos": "FW" }, { "word": "最多", "pos": "Da" }, { "word": "容納", "pos": "VJ" }, { "word": "59,000", "pos": "Neu" }, { "word": "個", "pos": "Nf" }, { "word": "人", "pos": "Na" }, { "word": ",", "pos": "COMMACATEGORY" }, { "word": "或", "pos": "Caa" }, { "word": "5.9萬", "pos": "Neu" }, { "word": "人", "pos": "Na" }, { "word": ",", "pos": "COMMACATEGORY" }, { "word": "再", "pos": "D" }, { "word": "多", "pos": "D" }, { "word": "就", "pos": "D" }, { "word": "不行", "pos": "VH" }, { "word": "了", "pos": "T" }, { "word": ".", "pos": "PERIODCATEGORY" }, { "word": "這", "pos": "Nep" }, { "word": "是", "pos": "SHI" }, { "word": "環評", "pos": "Na" }, { "word": "的", "pos": "DE" }, { "word": "結論", "pos": "Na" }, { "word": ".", "pos": "PERIODCATEGORY" } ], "entities": [ { "word": "59,000", "type": "CARDINAL", "start": 24, "end": 30 }, { "word": "5.9萬", "type": "CARDINAL", "start": 34, "end": 38 } ] } ] }
Alternative
If you want to run this service without Docker, you can follow this steps after data folder is ready.
However, we highly recommend using Docker Compose.
- Install required packages
pip3 install -r requirements.txt - Run
uvicorn app.main:app --host=0.0.0.0 --port=5005
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
