Map construction data to standard ontologies. Create semantic mappings between different data schemas
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install ontology-mapper或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install ontology-mapper⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/ontology-mapper/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: "ontology-mapper" description: "Map construction data to standard ontologies. Create semantic mappings between different data schemas" homepage: "https://datadrivenconstruction.io" metadata: {"openclaw": {"emoji": "🌐", "os": ["darwin", "linux", "win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"]}}} ---
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"
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 level in a building"),
"Space": OntologyConcept("Space", "Space", OntologyType.COBIE,
"A spatial region"),
"Type": OntologyConcept("Type", "Type", OntologyType.COBIE,
"A product type or specification"),
"Component": OntologyConcept("Component", "Component", OntologyType.COBIE,
"An individual product instance"),
"Zone": OntologyConcept("Zone", "Zone", OntologyType.COBIE,
"A spatial grouping of spaces"),
"System": OntologyConcept("System", "System", OntologyType.COBIE,
"A building system or network"),
}
# Uniclass (simplified)
ontologies[OntologyType.UNICLASS] = {
"Ss_25": OntologyConcept("Ss_25", "Wall Systems", OntologyType.UNICLASS),
"Ss_30": OntologyConcept("Ss_30", "Roof Systems", OntologyType.UNICLASS),
"Ss_32": OntologyConcept("Ss_32", "Floor Systems", OntologyType.UNICLASS),
"Ss_35": OntologyConcept("Ss_35", "Stair Systems", OntologyType.UNICLASS),
"Pr_20": OntologyConcept("Pr_20", "Structural Products", OntologyType.UNICLASS),
"Pr_30": OntologyConcept("Pr_30", "Wall Products", OntologyType.UNICLASS),
"Pr_35": OntologyConcept("Pr_35", "Door Products", OntologyType.UNICLASS),
"Pr_40": OntologyConcept("Pr_40", "Window Products", OntologyType.UNICLASS),
}
# MasterFormat (simplified)
ontologies[OntologyType.MASTERFORMAT] = {
"03": OntologyConcept("03", "Concrete", OntologyType.MASTERFORMAT),
"04": OntologyConcept("04", "Masonry", OntologyType.MASTERFORMAT),
"05": OntologyConcept("05", "Metals", OntologyType.MASTERFORMAT),
"06": OntologyConcept("06", "Wood and Plastics", OntologyType.MASTERFORMAT),
"07": OntologyConcept("07", "Thermal and Moisture Protection", OntologyType.MASTERFORMAT),
"08": OntologyConcept("08", "Doors and Windows", OntologyType.MASTERFORMAT),
"09": OntologyConcept("09", "Finishes", OntologyType.MASTERFORMAT),
"22": OntologyConcept("22", "Plumbing", OntologyType.MASTERFORMAT),
"23": OntologyConcept("23", "HVAC", OntologyType.MASTERFORMAT),
"26": OntologyConcept("26", "Electrical", OntologyType.MASTERFORMAT),
}
return ontologies
def _load_mapping_rules(self) -> List[SemanticMapping]:
...安装 Ontology Mapper 后,可以对 AI 说这些话来触发它
Help me get started with Ontology Mapper
Explains what Ontology Mapper does, walks through the setup, and runs a quick demo based on your current project
Use Ontology Mapper to map construction data to standard ontologies
Invokes Ontology Mapper with the right parameters and returns the result directly in the conversation
What can I do with Ontology Mapper in my ai agent & automation workflow?
Lists the top use cases for Ontology Mapper, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/ontology-mapper/ 目录(个人级,所有项目可用),或 .claude/skills/ontology-mapper/(项目级)。重启 AI 客户端后,用 /ontology-mapper 主动调用,或让 AI 根据上下文自动发现并使用。
Ontology Mapper 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Ontology Mapper 可免费安装使用。请查阅仓库了解许可证信息。
Map construction data to standard ontologies. Create semantic mappings between different data schemas
Ontology Mapper 属于「AI Agent & Automation」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my ai agent & automation tasks using Ontology Mapper
Identifies repetitive steps in your workflow and sets up Ontology Mapper to handle them automatically