gnn-ontology
GNN Active Inference ontology processing and validation. Use when working with ActInfOntologyAnnotation sections, mapping GNN variables to ontology terms…
от ActiveInferenceInstitute★ 36 звёзд на GitHub
Установить gnn-ontology в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
GNN Ontology Processing (Step 10)
Purpose
Processes Active Inference ontology annotations in GNN models. Maps GNN variables to standardized Active Inference concepts and validates semantic consistency.
Key Commands
# Run ontology processing
python src/gnn/10_ontology.py --target-dir input/gnn_files --output-dir output --verbose
# As part of pipeline
python src/gnn/main.py --only-steps 10 --verbose
Ontology Term Mapping
| GNN Annotation | Ontology Concept | Description |
|---|---|---|
LikelihoodMatrix |
A matrix | Observation model |
TransitionMatrix |
B matrix | State dynamics |
HiddenState |
s vector | Latent state beliefs |
Observation |
o vector | Sensory observations |
Policy |
π | Action sequences |
Preference |
C matrix | Preferred observations |
API
from gnn.ontology import (
process_ontology,
parse_gnn_ontology_section,
process_gnn_ontology,
analyze_ontology_content,
load_defined_ontology_terms,
validate_annotations,
suggest_terms,
summarise_coverage,
build_ontology_terms,
generate_ontology_report_for_file,
parse_annotation,
ParsedAnnotation,
OntologyTermIndex,
OntologyProcessor,
OntologyValidator,
)
# Process ontology section from GNN content
parsed = parse_gnn_ontology_section(gnn_content)
# Load defined ontology terms
terms = load_defined_ontology_terms()
# Validate annotations against defined terms (case-insensitive)
result = validate_annotations(annotations_list, terms)
# Single pure entry point: parse + load + validate in one call
analysis = analyze_ontology_content(gnn_content, terms)
# Nearest-term suggestions for unknown annotations
suggestions = suggest_terms(["x=HidenState"], terms)
# Compact coverage line for reports/LLM prompts
summary = summarise_coverage(result)
# Build a custom vocabulary in memory (no JSON file)
custom = build_ontology_terms(["Foo", "Bar"], descriptions={"Foo": "a foo"})
# Use OntologyProcessor class
processor = OntologyProcessor()
result = processor.process_ontology(data)
# Use OntologyValidator class
validator = OntologyValidator()
is_valid = validator.validate_ontology(content)
Key Exports
process_ontology— main pipeline processing functionparse_gnn_ontology_section— extract ontology from GNN contentanalyze_ontology_content— pure parse + load + validate in one callvalidate_annotations— validate against known terms (case-insensitive)suggest_terms— nearest-ontology-term suggestions for unknown annotationssummarise_coverage— human-readable coverage line for report/LLM consumersbuild_ontology_terms— build a vocabulary dict in memoryparse_annotation→ParsedAnnotation— typed 3-tuple (key, value, comment)OntologyProcessor— class withprocess_ontology(),validate_terms()OntologyValidator— class withvalidate_ontology(),check_consistency()OntologyTermIndex— prebuilt case-insensitive vocabulary index with lookup, known_terms, validate, suggest and contains checksresolve_declared_label/pinned_declared_index/verify_ontology_pin— resolve declared labels to release-v5term-*identifiers through the pinned vocabulary bridge (verify the copy against its pin withjust ontology-pin)
Output
- Ontology mappings in
output/10_ontology_output/ - Validation reports for annotation consistency
MCP Tools
This module registers tools with the GNN MCP server (see mcp.py):
extract_ontology_annotationslist_standard_ontology_termsprocess_ontologyvalidate_ontology_terms
References
Documentation
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- AGENTS.md
- README.md
- SPEC.md
- __init__.py
- act_inf_ontology_terms.json
- active_inference_ontology_terms.json
- bridge.py
- mcp.py
- ontology-pin.json
- processor.py
- utils.py
FAQ
Что делает скилл gnn-ontology?
GNN Active Inference ontology processing and validation. Use when working with ActInfOntologyAnnotation sections, mapping GNN variables to ontology terms, validating semantic annotations, or exploring Active Inference concept hierarchies.
Как установить скилл gnn-ontology?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gnn-ontology запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…