Back to list
kubony

ontology-engine

by kubony

마크다운 노트를 RDF/TTL 지식 그래프로 변환 - SPARQL 질의로 시맨틱 검색

0🍴 0📅 Jan 8, 2026

SKILL.md


name: ontology-engine description: Convert markdown vault to RDF/TTL knowledge graph. Extract persons, projects, meetings, and relationships into semantic triples.

Ontology Engine

Convert markdown vault to RDF/TTL ontology for semantic querying.

Usage

Build Knowledge Graph

source .venv/bin/activate && \
python .claude/skills/ontology-engine/scripts/vault_to_ttl.py ./vault --output ./knowledge.ttl

With Custom Folders

source .venv/bin/activate && \
python .claude/skills/ontology-engine/scripts/vault_to_ttl.py ./vault \
  --persons-dir contacts \
  --projects-dir work \
  --output ./knowledge.ttl

Parameters

ParameterDefaultDescription
vault_pathRequiredRoot vault directory
--outputknowledge.ttlOutput TTL file
--persons-dirpersonsPerson files folder
--projects-dirprojectsProject files folder
--archives-dirarchivesArchived projects folder

Extraction Rules

Person Files

Location: {vault}/{persons-dir}/*.md

Filename Pattern: Name_Organization.md

Extracted Fields:

  • Name (from YAML title or filename)
  • Organization (from filename suffix)
  • Tags (from YAML tags)
  • Summary (from YAML summary)
  • Contact info (from YAML contact)
  • Last contact date (from YAML last_contact)

Project Files

Location: {vault}/{projects-dir}/*/, {vault}/{archives-dir}/*/

Folder Pattern: YYMM ProjectName or YYMMDD ProjectName

Extracted Fields:

  • Project name
  • Start date (from folder name)
  • Tags
  • Summary
  • Status (active/archived)

Meetings

Pattern: ## YYYY.MM.DD or ## YYYY-MM-DD headings

Extracted Fields:

  • Date
  • Summary (content under heading)
  • Topics (hashtags in content)
  • Participants (from [[wikilinks]])

Relationships

From [[Wikilinks]]:

  • Person → Person: :knows
  • Person → Project: :involvedIn
  • Meeting → Person: :participant
  • Meeting → Project: :relatedTo

Output Schema

Classes

ClassDescription
:PersonIndividual person
:ProjectProject or initiative
:MeetingMeeting, call, or interaction
:OrganizationCompany or group
:TopicDiscussion topic

Properties

PropertyDomainRange
:nameAnystring
:dateMeeting/Projectdate
:summaryAnystring
:filePathPerson/Projectstring
:tagAnystring
:participantMeetingPerson
:affiliatedWithPersonOrganization
:involvedInPersonProject
:relatedToMeetingProject
:hasTopicMeetingTopic
:knowsPersonPerson

Example Output

@prefix : <http://obsidian.local/ontology#> .
@prefix data: <http://obsidian.local/data#> .

data:John_Doe a :Person ;
    :name "John Doe"@en ;
    :affiliatedWith data:Acme_Corp ;
    :summary "Senior developer specializing in AI" ;
    :filePath "persons/John_Doe_Acme.md" .

data:Acme_Corp a :Organization ;
    :name "Acme Corp"@en .

data:John_Doe_meeting_0 a :Meeting ;
    :participant data:John_Doe ;
    :date "2024-01-15"^^xsd:date ;
    :summary "Project kickoff discussion" .

Dependencies

pip install rdflib pyyaml

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon