ontology-mapper
БесплатноБез исполняемых скриптовНе проверенMap construction data to standard ontologies. Create semantic mappings between different data schemas
от datadrivenconstruction★ 461 звезда на GitHubОб этом скилле
Ontology Mapper
Overview
Based on DDC methodology (Chapter 2.2), this skill maps construction data to standard ontologies like IFC, COBie, Uniclass, and OmniClass, enabling semantic interoperability between systems.
Book Reference: "Доминирование открытых данных" / "Open Data Dominance"
Quick Start
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Dict, Optional, Set, Tuple
from datetime import datetime
import json
import re
class OntologyType(Enum):
"""Standard construction ontologies"""
IFC = "ifc" # Industry Foundation Classes
COBIE = "cobie" # Construction Operations Building Information Exchange
UNICLASS = "uniclass" # UK classification
OMNICLASS = "omniclass" # North American classification
MASTERFORMAT = "masterformat" # CSI MasterFormat
UNIFORMAT = "uniformat" # CSI UniFormat
CUSTOM = "custom" # Custom ontology
class MappingConfidence(Enum):
"""Confidence level of mapping"""
EXACT = "exact" # 100% match
HIGH = "high" # 90%+ match
MEDIUM = "medium" # 70-90% match
LOW = "low" # 50-70% match
UNCERTAIN = "uncertain" # <50% match
class RelationType(Enum):
"""Types of relationships between concepts"""
EQUIVALENT = "equivalent" # Same concept
BROADER = "broader" # Source is more specific
NARROWER = "narrower" # Source is more general
RELATED = "related" # Related but not equivalent
PART_OF = "part_of" # Component relationship
HAS_PART = "has_part" # Contains components
@dataclass
class OntologyConcept:
"""Concept in an ontology"""
id: str
name: str
ontology: OntologyType
definition: Optional[str] = None
parent_id: Optional[str] = None
synonyms: List[str] = field(default_factory=list)
properties: Dict[str, str] = field(default_factory=dict)
@dataclass
class SemanticMapping:
"""Mapping between two concepts"""
source_concept: str
source_ontology: OntologyType
target_concept: str
target_ontology: OntologyType
relation: RelationType
confidence: MappingConfidence
notes: Optional[str] = None
created_by: str = "auto"
created_at: datetime = field(default_factory=datetime.now)
@dataclass
class MappingResult:
"""Result of ontology mapping operation"""
source_field: str
source_value: str
mappings: List[SemanticMapping]
best_match: Optional[SemanticMapping] = None
unmapped: bool = False
@dataclass
class OntologyMappingReport:
"""Complete mapping report"""
total_fields: int
mapped_fields: int
unmapped_fields: int
mappings: List[MappingResult]
coverage: float
confidence_distribution: Dict[str, int]
recommendations: List[str]
class OntologyMapper:
"""
Map construction data to standard ontologies.
Based on DDC methodology Chapter 2.2.
"""
def __init__(self):
self.ontologies = self._load_ontologies()
self.mapping_rules = self._load_mapping_rules()
self.synonym_map = self._build_synonym_map()
def _load_ontologies(self) -> Dict[OntologyType, Dict[str, OntologyConcept]]:
"""Load standard construction ontologies"""
ontologies = {}
# IFC Schema (simplified)
ontologies[OntologyType.IFC] = {
"IfcWall": OntologyConcept("IfcWall", "Wall", OntologyType.IFC,
"A vertical construction that bounds or subdivides spaces"),
"IfcSlab": OntologyConcept("IfcSlab", "Slab", OntologyType.IFC,
"A horizontal planar building element"),
"IfcBeam": OntologyConcept("IfcBeam", "Beam", OntologyType.IFC,
"A horizontal structural member"),
"IfcColumn": OntologyConcept("IfcColumn", "Column", OntologyType.IFC,
"A vertical structural member"),
"IfcDoor": OntologyConcept("IfcDoor", "Door", OntologyType.IFC,
"A building element for access"),
"IfcWindow": OntologyConcept("IfcWindow", "Window", OntologyType.IFC,
"A building element for light and ventilation"),
"IfcRoof": OntologyConcept("IfcRoof", "Roof", OntologyType.IFC,
"A building element covering a building"),
"IfcStair": OntologyConcept("IfcStair", "Stair", OntologyType.IFC,
"A vertical circulation element"),
"IfcSpace": OntologyConcept("IfcSpace", "Space", OntologyType.IFC,
"A defined volume of air"),
"IfcBuildingStorey": OntologyConcept("IfcBuildingStorey", "Building Storey",
OntologyType.IFC, "A horizontal aggregation of spaces"),
}
# COBie (simplified)
ontologies[OntologyType.COBIE] = {
"Floor": OntologyConcept("Floor", "Floor", OntologyType.COBIE,
"A floor or leve
Установить ontology-mapper в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ontology-mapper?
Map construction data to standard ontologies. Create semantic mappings between different data schemas
Как установить скилл ontology-mapper?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ontology-mapper запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic