计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
python-pipeline【效率与协作】Guides high-level Python LTP pipeline workflows for model loading, sentence splitting, task outputs, custom words, and integration helpers.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user wants to use from ltp import LTP, StnSplit for Chinese NLP inference, output conversion, or service integration.
LTP(...), pipeline, LTPOutput, StnSplit, LTP/tiny, LTP/small, LTP/base, LTP/legacy, or local LTP model directories.Route low-level perceptron model/trainer APIs to ../legacy-extension/SKILL.md, deep-training/config tasks to ../training-and-data/SKILL.md, and Rust/C bindings to ../rust-bindings/SKILL.md.
Confirm the package imports and optional CUDA state from the root skill:
python ../../scripts/check_ltp_install.py --json
For no-network diagnostics, run the pipeline smoke script without loading a model:
python scripts/ltp_pipeline_smoke.py --skip-model-load
If the user has a local or cached model, load it explicitly:
python scripts/ltp_pipeline_smoke.py --model-path /path/to/ltp-model --local-files-only --tasks cws,pos,ner
For real application code, use a model id or local path and choose tasks deliberately:
from ltp import LTP
ltp = LTP("LTP/small")
output = ltp.pipeline(["他叫汤姆去拿外衣。"], tasks=["cws", "pos", "ner"])
print(output.cws, output.pos, output.ner)
LTPOutput, and method behavior.LTP("LTP/legacy") supports SRL/DEP/SDP/SDPG. It supports CWS/POS/NER only.cws is omitted from tasks; pass pretokenized List[List[str]].