技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
engine-api【数据与研究】Use SnipsNLUEngine's Python API for fitting datasets, parsing text, inspecting intents and slots, configuring training, and persisting or loading engines.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to operate Snips NLU through Python code:
create a SnipsNLUEngine, fit an already-valid dataset, parse user text,
retrieve intent or slot-only outputs, control random state or force_retrain,
and persist or load an engine artifact.
SnipsNLUEngine.fit, parse, get_intents, get_slots,
persist, from_path, or NLUEngineConfig.top_n, or model-version/resource persistence behavior.../dataset-and-resources/SKILL.md.../cli-workflows/SKILL.md.NLUEngineConfig; keep implementation details outside
this engine API route unless the task explicitly asks for integration code.Read only the references needed for the task:
references/api-reference.md for signatures, result shapes, None intent,
filters, top_n, get_intents, and get_slots.references/workflows.md for fit/parse code patterns and the bundled smoke
helper usage.references/configuration-and-persistence.md for default language configs,
random state, force_retrain, resources, and persisted model compatibility.references/troubleshooting.md when exceptions, missing resources,
nondeterminism, loading failures, or dependency/Python-version issues appear.For a quick API smoke test against a user-provided dataset JSON, run the bundled helper from this sub-skill directory:
python scripts/snips_nlu_engine_smoke.py \
--dataset path/to/dataset.json \
--query "turn on the kitchen lights" \
--intent-filter sampleTurnOnLight \
--top-n 2
The helper never uses an embedded source-relative dataset path and never overwrites an existing persistence directory. It prints a JSON report and, when language resources are unavailable, reports the resource name and next steps.
str text, not bytes, into parse or get_slots.None/JSON null intent semantics: intent filters do not remove
the None intent, and get_slots(text, None) returns an empty list.random_state to SnipsNLUEngine and
keep the same package/model version and language resources.bypass_version_check=True risk.