
Ontology Engineer
- 33 installs
- 7 repo stars
- Updated May 20, 2026
- daemon-blockint-tech/agentic-enteprises-skill
Design OWL/RDF ontologies and build knowledge graphs: SKOS taxonomies, SPARQL querying, entity resolution, semantic reasoning, and linked-data patterns.
About
Guides ontology design and knowledge-graph construction covering OWL/RDF modeling, SKOS taxonomies, SPARQL querying, entity resolution, and semantic reasoning. A developer uses it when scoping a domain with competency questions, building a knowledge graph, or writing graph queries and validation.
- Covers OWL 2 profiles, restrictions, and reasoners (HermiT, Pellet, FaCT++)
- Includes a knowledge-graph pipeline from source ID to entity resolution to graph population
Ontology Engineer by the numbers
- 33 all-time installs (skills.sh)
- Ranked #1,088 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/daemon-blockint-tech/agentic-enteprises-skill --skill ontology-engineerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 33 |
|---|---|
| repo stars | ★ 7 |
| Last updated | May 20, 2026 |
| Repository | daemon-blockint-tech/agentic-enteprises-skill ↗ |
What it does
Design OWL/RDF ontologies and build knowledge graphs: SKOS taxonomies, SPARQL querying, entity resolution, semantic reasoning, and linked-data patterns.
Files
Ontology Engineer
Overview
Design ontologies and build knowledge graphs. This skill covers OWL/RDF ontologies, SKOS taxonomies, SPARQL querying, knowledge graph construction, semantic reasoning, and linked data patterns.
Features
- OWL/RDF ontology design: classes, properties, restrictions, axioms
- SKOS taxonomy creation: concepts, hierarchies, labels, mappings
- SPARQL querying: SELECT, CONSTRUCT, ASK, DESCRIBE patterns
- Knowledge graph construction: data extraction, entity resolution, graph loading
- Semantic reasoning: rule-based inference, OWL reasoning, consistency checking
- Linked data patterns: URIs, dereferencing, RDF serialization, data publishing
Usage
1. Identify the user's ontology need (design, taxonomy, querying, or knowledge graph) 2. Follow the corresponding workflow below 3. Produce structured outputs: OWL files, SKOS taxonomies, SPARQL queries, or knowledge graph schemas
Examples
- User: "Design an ontology for products"
Agent: Runs Ontology Design workflow, defines classes (Product, Category, Feature), properties (hasCategory, hasFeature), produces OWL file
- User: "Write a SPARQL query"
Agent: Runs Querying workflow, constructs SELECT query with graph patterns, filters, and aggregations
- User: "Build a knowledge graph"
Agent: Runs Knowledge Graph Construction workflow, extracts entities, resolves duplicates, loads into triple store
When to Use
- Scoping domains with competency questions and designing OWL/RDF ontologies
- Building knowledge graphs, entity resolution, and linked-data integration
- Writing SPARQL, Cypher, or graph validation and reasoning workflows
- Selecting semantic-web or property-graph tools and reuse from public ontologies
When NOT to Use
- Relational warehouse star schemas or batch ETL → use
data-warehouse-engineer - Enterprise data platform vendor selection or mesh operating model → use
data-architect - LLM system prompts, agents, or RAG orchestration → use
prompt-engineer - Business requirements workshops without semantic modeling → use
business-analyst
Core Workflows
1. Ontology Design Workflow
Phase checklist:
1. Scope & competency questions
- Define the domain boundaries
- Write 5-10 competency questions the ontology must answer
- Example: "Which drugs interact with proteins encoded by a given gene?"
2. Reuse assessment
- Search existing ontologies (BioPortal, LOV, OntoBee)
- Import and align relevant upper ontologies (DOLCE, BFO, schema.org)
- Document reuse decisions and mappings
3. Conceptual modeling
- Identify entities (classes), relationships (properties), instances
- Create class hierarchy (is-a relations)
- Define object properties (relations between classes) and data properties (attributes)
4. Formalization in OWL/RDF
- Encode in OWL 2 (DL, RL, or QL profile based on reasoning needs)
- Add restrictions (cardinality, value constraints)
- Define inverse, transitive, symmetric properties
5. Validation & reasoning
- Check consistency with reasoner (HermiT, Pellet, FaCT++)
- Verify competency questions with SPARQL
- Review with domain experts
2. Knowledge Graph Construction
Construction pipeline:
1. Source identification
- Structured: relational databases, APIs, CSV
- Semi-structured: JSON, XML, logs
- Unstructured: text, documents, images
2. Schema/ontology alignment
- Map source schemas to ontology
- Handle property mapping, unit conversion, URI generation
3. Entity extraction & resolution
- Extract entities from unstructured sources (NER, RE)
- Resolve duplicates: "IBM" = "International Business Machines" = "IBM Corp."
- Link to external identifiers (Wikidata, DBpedia, ORCID)
4. Graph population
- Transform to RDF triples or property graph format
- Load into triple store or graph database
- Validate graph completeness and quality
3. Querying & Retrieval
Choose query language by store type:
| Store Type | Query Language | Use Case |
|---|---|---|
| RDF triple store | SPARQL | Semantic web, OWL reasoning, linked data |
| Labeled property graph | Cypher | Neo4j, pattern matching, path queries |
| GraphQL | GraphQL+ | API-layer graph queries |
| Gremlin | Gremlin | Traversal-heavy, multi-model graphs |
4. Validation & Reasoning
Reasoning tasks:
- Consistency checking: No contradictory class assertions
- Classification: Infer subclass hierarchies
- Property entailment: Infer transitive, inverse, symmetric relations
- Instance checking: Validate type assertions
Validation checklist:
- [ ] Ontology is consistent (no unsatisfiable classes)
- [ ] All competency questions answerable with queries
- [ ] No orphan classes or properties
- [ ] URIs are dereferenceable or resolvable
- [ ] Labels and descriptions in multiple languages if needed
Knowledge Graphs
Property Graph vs RDF Triple Store
| Aspect | Property Graph (Neo4j) | RDF Triple Store |
|---|---|---|
| Model | Nodes + Relationships with properties | Subject-Predicate-Object triples |
| Schema | Flexible, optional | OWL/RDFS formal schema |
| Query | Cypher | SPARQL |
| Reasoning | Limited (APOC) | Full OWL reasoning |
| Use case | Recommendations, fraud detection | Semantic integration, linked data |
Graph Database Patterns
Neo4j / Cypher
Node and relationship creation:
CREATE (a:Person {name: 'Alice', age: 30})
CREATE (b:Company {name: 'TechCorp'})
CREATE (a)-[:WORKS_AT {since: 2020}]->(b)Pattern matching:
// Find Alice's colleagues
MATCH (alice:Person {name: 'Alice'})-[:WORKS_AT]->(company:Company)<-[:WORKS_AT]-(colleague:Person)
RETURN colleague.name
// Shortest path between two people
MATCH path = shortestPath(
(a:Person {name: 'Alice'})-[:KNOWS|WORKS_AT*]-(b:Person {name: 'Bob'})
)
RETURN path
// Recommendation: people who work at similar companies
MATCH (person:Person)-[:WORKS_AT]->(company:Company)-[:IN_INDUSTRY]->(industry:Industry)
WITH person, industry, count(company) AS companyCount
ORDER BY companyCount DESC
RETURN person.name, industry.name, companyCountAggregation and analytics:
// PageRank for influence scoring
CALL gds.pageRank.stream('myGraph')
YIELD nodeId, score
RETURN gds.util.asNode(nodeId).name AS name, score
ORDER BY score DESC
// Community detection (Louvain)
CALL gds.louvain.stream('myGraph')
YIELD nodeId, communityId
RETURN communityId, count(*) AS communitySize
ORDER BY communitySize DESCAmazon Neptune
Supports both RDF/SPARQL and property graph/Gremlin:
// Gremlin example
g.V().hasLabel('Person').has('name', 'Alice')
.out('WORKS_AT').values('name')Entity Resolution
Resolution Pipeline
1. Blocking: Candidate pairs (same name, same location) 2. Comparison: Similarity features (Jaro-Winkler, cosine, embedding) 3. Classification: Match / non-match / uncertain 4. Clustering: Transitive closure to form canonical entities
Techniques
| Technique | When | Example |
|---|---|---|
| Rule-based | High precision, known patterns | Same email → same person |
| Probabilistic | Medium data, explainable | Fellegi-Sunter record linkage |
| ML-based | Large data, complex features | Siamese networks, ER models |
| Embedding-based | Text-heavy, semantic matching | Entity embeddings, sentence transformers |
Python example (dedupe.io):
import dedupe
fields = [
{'field': 'name', 'type': 'String'},
{'field': 'address', 'type': 'String'},
{'field': 'phone', 'type': 'Exact'}
]
deduper = dedupe.Dedupe(fields)
deduper.prepare_training(data)
deduper.train()
clusters = deduper.partition(data, threshold=0.5)Taxonomy Construction
Manual Approach
1. Extract candidate terms from corpus 2. Group into broader-narrower hierarchies 3. Define relationships (is-a, part-of, related-to) 4. Validate with domain experts 5. Publish in SKOS
Automated Approach
# Using text mining + embeddings
from sklearn.cluster import AgglomerativeClustering
# Embed terms, cluster hierarchically
clusters = AgglomerativeClustering(n_clusters=None, distance_threshold=0.5)
clusters.fit(term_embeddings)SKOS Representation
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
ex:industries a skos:ConceptScheme ;
skos:prefLabel "Industries" .
ex:technology a skos:Concept ;
skos:prefLabel "Technology" ;
skos:broader ex:industries ;
skos:narrower ex:software, ex:hardware ;
skos:related ex:telecommunications .
ex:software a skos:Concept ;
skos:prefLabel "Software" ;
skos:broader ex:technology .Knowledge Extraction from Text
Pipeline
Raw Text → Preprocessing → NER → Relation Extraction → Entity Linking → Graph PopulationTools
| Task | Tools |
|---|---|
| NER | spaCy, Stanza, Flair, BERT-based ( transformers) |
| Relation Extraction | OpenIE, REBEL, spaCy-RE |
| Entity Linking | DBpedia Spotlight, Wikifier, BLINK |
| Coreference | CoreNLP, huggingface models |
spaCy example:
import spacy
nlp = spacy.load("en_core_web_trf")
doc = nlp("Apple is looking at buying U.K. startup for $1 billion")
for ent in doc.ents:
print(ent.text, ent.label_) # Apple ORG, U.K. GPE, $1 billion MONEYGraph Embeddings
Techniques
| Method | Approach | Best For |
|---|---|---|
| TransE | Translation-based | Simple relations |
| DistMult | Bilinear interactions | Dense multi-relational |
| ComplEx | Complex-valued | Asymmetric relations |
| RotatE | Rotation in complex space | Hierarchical patterns |
| Node2Vec | Random walks | Homophily + structural equivalence |
Application:
- Link prediction:
?company ex:acquired ex:Startup - Entity classification: Predict node type from neighbors
- Similarity: Find similar entities in embedding space
Graph Quality Metrics
| Metric | Definition | Target |
|---|---|---|
| Coverage | % of real-world entities represented | >90% for core domains |
| Accuracy | % of triples that are factually correct | >99% for critical paths |
| Completeness | % of expected properties populated | >80% |
| Consistency | No contradictory assertions | Zero tolerance |
| Timeliness | Staleness of data | Hours for real-time, weeks for static |
| Connectivity | % of entities connected to main graph | >95% |
Ontology Design
Ontology Development Methodology
101 Methodology (Noy & McGuinness)
1. Determine scope — Competency questions 2. Consider reuse — Search existing ontologies 3. Enumerate terms — Brainstorm classes and properties 4. Define classes — Hierarchy, disjointness 5. Define properties — Domain, range, characteristics 6. Define facets — Cardinality, value types 7. Create instances — Populate with real data 8. Check consistency — Reasoner validation
NeOn Methodology (Enterprise-focused)
- More elaborate, supports collaborative development
- Includes scenario-based requirements, modularization
- Recommended for large, distributed ontology projects
Upper Ontologies (Foundational)
| Ontology | Focus | Use Case |
|---|---|---|
| BFO (Basic Formal Ontology) | Philosophy of reality | Biomedical ontologies (OBO) |
| DOLCE | Cognitive/linguistic | Natural language understanding |
| SUMO | General, comprehensive | Broad interoperability |
| schema.org | Web/markup | SEO, structured data |
| FOAF | People/social | Social web, identity |
| SKOS | Concepts/vocabularies | Taxonomies, thesauri |
When to use upper ontologies:
- Need cross-domain interoperability
- Complex reasoning over time, space, participation
- Academic or biomedical domains
When to avoid:
- Simple application ontologies
- Performance-critical scenarios
- Teams without ontology expertise
Modeling Patterns
Taxonomy Pattern
ex:Animal a owl:Class .
ex:Mammal rdfs:subClassOf ex:Animal .
ex:Dog rdfs:subClassOf ex:Mammal .
ex:myDog a ex:Dog .
# Inferred: ex:myDog a ex:Mammal, ex:AnimalPart-Whole Pattern (Mereology)
ex:hasPart a owl:ObjectProperty, owl:TransitiveProperty ;
rdfs:domain ex:Composite ;
rdfs:range ex:Part .
ex:isPartOf owl:inverseOf ex:hasPart ;
a owl:TransitiveProperty .Role Pattern
# Roles as classes, not properties
ex:Employee a owl:Class ;
owl:equivalentClass [
a owl:Restriction ;
owl:onProperty ex:employedBy ;
owl:someValuesFrom ex:Organization
] .
# A person plays a role
ex:playsRole a owl:ObjectProperty ;
rdfs:domain ex:Person ;
rdfs:range ex:Role .N-ary Relations Pattern
# Reify the relation as a class
ex:Employment a owl:Class ;
rdfs:subClassOf [
a owl:Restriction ; owl:onProperty ex:employee ; owl:cardinality 1 ;
owl:Restriction ; owl:onProperty ex:employer ; owl:cardinality 1 ;
owl:Restriction ; owl:onProperty ex:startDate ; owl:cardinality 1
] .Time & Change Pattern
# Time-indexed statements (4D fluent)
ex:hasWeight a owl:ObjectProperty ;
rdfs:range ex:WeightMeasurement .
ex:WeightMeasurement a owl:Class ;
rdfs:subClassOf [
owl:Restriction ; owl:onProperty ex:value ; owl:cardinality 1 ;
owl:Restriction ; owl:onProperty ex:atTime ; owl:cardinality 1
] .Anti-Patterns
| Anti-Pattern | Problem | Fix |
|---|---|---|
| Class as property value | ex:hasColor ex:Red where Red is instance | Use datatype or defined class |
| Over-specification | Model every detail | Focus on competency questions |
| Class for instance | ex:ToyotaCar vs ex:Car | Instances belong to class, not be classes |
| Properties vs classes | ex:isRed property vs ex:RedThing class | Prefer properties for transient characteristics |
| Orphan classes | No properties or relations defined | Add outgoing/incoming edges |
| Circular definitions | A defined by B, B defined by A | Break cycle with primitive assertions |
Reasoning & Inference
OWL Reasoning Tasks
| Task | Description | Tool |
|---|---|---|
| Consistency | Is the ontology free of contradictions? | HermiT, Pellet, FaCT++ |
| Satisfiability | Can a class have any instances? | Same as above |
| Subsumption | Is A a subclass of B? | Same as above |
| Classification | Compute complete class hierarchy | Same as above |
| Instance retrieval | Find all instances of a class | SPARQL + inference |
| Realization | Find most specific class for instance | Same as above |
Rule-Based Reasoning (OWL 2 RL / SWRL)
# SWRL rule
ex:hasParent(?x, ?y) ^ ex:hasBrother(?y, ?z) -> ex:hasUncle(?x, ?z)Materialization vs Query-Time Reasoning
| Approach | Pros | Cons |
|---|---|---|
| Materialization | Fast queries | Stale data, storage overhead |
| Query-time | Always current | Slower, complex configuration |
| Hybrid | Balance | Requires careful design |
Modularization
Import Strategy
@prefix ont: <http://example.org/ontology/> .
<http://example.org/my-domain> a owl:Ontology ;
owl:imports <http://example.org/upper-ontology> ;
owl:imports <http://example.org/shared-vocabulary> .Module Extraction
- Star module: All axioms mentioning signature entities
- Bottom module: All consequences for a set of classes
- Top module: All axioms that can affect a set of classes
Use case: Extract a small, self-contained module for mobile or edge deployment.
Versioning & Evolution
Best Practices
- Use versioned URIs:
http://example.org/ontology/1.2/ - Maintain backward compatibility when possible
- Document breaking changes
- Provide migration mappings (ontology alignment)
Change Types
| Change | Backward Compatible? | Example |
|---|---|---|
| Add class/property | Yes | Add ex:Contractor |
| Add subclass | Yes | ex:Contractor ⊂ ex:Employee |
| Remove class | No | Delete ex:Intern |
| Make class disjoint | No | ex:Employee disjoint ex:Vendor |
| Narrow property range | No | ex:worksAt range from Thing to Organization |
Ontology Alignment
# Map two ontologies
ex1:Employee owl:equivalentClass ex2:Worker .
ex1:worksAt owl:equivalentProperty ex2:employedBy .Semantic Web Standards
RDF (Resource Description Framework)
Core Model: Triples
Subject — Predicate — ObjectExample (Turtle syntax):
@prefix ex: <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
ex:Alice a foaf:Person ;
foaf:name "Alice Smith" ;
foaf:age 30 ;
ex:worksAt ex:ExampleCorp .
ex:ExampleCorp a ex:Organization ;
ex:name "Example Corporation" ;
ex:location "New York" .Serialization Formats
| Format | Readable | Compact | Use Case |
|---|---|---|---|
| Turtle (.ttl) | Yes | Medium | Human editing, development |
| N-Triples (.nt) | Somewhat | No | Streaming, line-based processing |
| RDF/XML (.rdf) | No | No | Legacy, XML ecosystems |
| JSON-LD (.jsonld) | Yes | Yes | Web APIs, JavaScript apps |
| TriG | Yes | Medium | Named graphs |
RDFS (RDF Schema)
Core Constructs
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
ex:Person a rdfs:Class ;
rdfs:label "Person" ;
rdfs:comment "A human being" .
ex:Employee rdfs:subClassOf ex:Person .
ex:worksAt a rdf:Property ;
rdfs:domain ex:Person ;
rdfs:range ex:Organization .RDFS inference rules:
- Subclass transitivity:
A ⊂ B,B ⊂ C→A ⊂ C - Domain/range: If
ex:worksAt rdfs:domain ex:Person, then?x ex:worksAt ?y→?x a ex:Person
OWL (Web Ontology Language)
OWL 2 Profiles
| Profile | Expressivity | Reasoning | Best For |
|---|---|---|---|
| OWL 2 DL | High | Complete (but slow) | Complex domain modeling |
| OWL 2 EL | Polynomial | Fast | Large biomedical ontologies (SNOMED CT) |
| OWL 2 QL | Query rewriting | Fast | Integration with relational DBs |
| OWL 2 RL | Rule-based | Fast | Scalable reasoning, streaming |
Common OWL Constructs
@prefix owl: <http://www.w3.org/2002/07/owl#> .
# Class equivalence
ex:Employee owl:equivalentClass [
a owl:Restriction ;
owl:onProperty ex:worksAt ;
owl:someValuesFrom ex:Organization
] .
# Property characteristics
ex:hasPart a owl:ObjectProperty ;
a owl:TransitiveProperty .
ex:isPartOf owl:inverseOf ex:hasPart .
ex:marriedTo a owl:SymmetricProperty .
# Disjoint classes
ex:Man owl:disjointWith ex:Woman .
# Cardinality restrictions
ex:Parent a owl:Restriction ;
owl:onProperty ex:hasChild ;
owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
owl:onClass ex:Person .
# Datatype restrictions
ex:Adult a owl:Restriction ;
owl:onProperty ex:age ;
owl:someValuesFrom [
a rdfs:Datatype ;
owl:onDatatype xsd:integer ;
owl:withRestrictions (
[xsd:minExclusive 17]
)
] .SPARQL Query Language
Basic Patterns
# Select all employees and their companies
SELECT ?person ?company
WHERE {
?person a ex:Employee .
?person ex:worksAt ?company .
}
# With FILTER and OPTIONAL
SELECT ?person ?name ?age
WHERE {
?person a ex:Person ;
ex:name ?name .
OPTIONAL { ?person ex:age ?age }
FILTER (strstarts(?name, "A"))
}Advanced Patterns
# Property paths: find all ancestors
SELECT ?ancestor
WHERE {
ex:Alice ex:hasParent+ ?ancestor .
}
# Aggregation
SELECT ?company (COUNT(?employee) AS ?count)
WHERE {
?employee ex:worksAt ?company .
}
GROUP BY ?company
HAVING (?count > 10)
# Subqueries
SELECT ?person ?avgSalary
WHERE {
{
SELECT ?person (AVG(?salary) AS ?avgSalary)
WHERE { ?person ex:hasSalary ?salary }
GROUP BY ?person
}
FILTER (?avgSalary > 50000)
}
# Federated query (query remote endpoint)
SELECT ?drug ?condition
WHERE {
SERVICE <http://dbpedia.org/sparql> {
?drug a dbo:Drug .
?drug dbo:indication ?condition .
}
}SPARQL Update
# Insert data
INSERT DATA {
ex:Bob a ex:Employee ;
ex:name "Bob Jones" ;
ex:worksAt ex:ExampleCorp .
}
# Delete + insert (transactional)
DELETE { ex:Alice ex:age 30 }
INSERT { ex:Alice ex:age 31 }
WHERE { ex:Alice ex:age 30 }Linked Data Principles
1. Use URIs as names for things 2. Use HTTP URIs so people can look them up 3. Provide useful information using standards (RDF, SPARQL) 4. Include links to other URIs to discover more
URI design best practices:
- Persistent: don't change when content changes
- Dereferenceable:
curl http://example.org/Alicereturns RDF - Human-readable:
http://example.org/person/Alicenothttp://example.org/id/12345 - Content negotiation: serve HTML to browsers, RDF to agents
SHACL (Shapes Constraint Language)
@prefix sh: <http://www.w3.org/ns/shacl#> .
ex:PersonShape a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:property [
sh:path ex:name ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ex:age ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:maxInclusive 150 ;
] ;
sh:property [
sh:path ex:worksAt ;
sh:class ex:Organization ;
sh:minCount 0 ;
] .Tools & Frameworks
Ontology Editors
| Tool | Best For | Key Features |
|---|---|---|
| Protege | Development, OWL editing | Reasoner integration, visualization, plugins |
| TopBraid Composer | Enterprise, SHACL | GraphQL generation, EDG platform |
| WebProtégé | Collaboration, review | Web-based, comments, change tracking |
| OntoWiki | Lightweight, publishing | Semantic wiki, faceted browsing |
Triple Stores / RDF Databases
| Store | License | Scaling | Reasoning | Best For |
|---|---|---|---|---|
| Apache Jena | Open source | Medium | Yes (OWL, rules) | Research, Java stack |
| GraphDB (Ontotext) | Commercial/Free | High | Yes (OWL, SHACL) | Enterprise, knowledge graphs |
| Virtuoso | Open/Commercial | High | Limited | Linked data, SPARQL endpoint |
| Stardog | Commercial | High | Yes (OWL, rules, ML) | Enterprise, data virtualization |
| Amazon Neptune | Cloud | Auto | Limited | AWS-native graphs |
| AllegroGraph | Commercial | High | Yes | Lisp/CL stack, geospatial |
| Blazegraph | Open source | Medium | Limited | Wikidata, research |
Graph Databases (Property Graph)
| Database | Query | Ecosystem | Best For |
|---|---|---|---|
| Neo4j | Cypher | Mature, Graph Data Science | Recommendations, fraud |
| Amazon Neptune | Gremlin, SPARQL | AWS integration | Multi-model, cloud |
| ArangoDB | AQL | Multi-model | Documents + graph |
| JanusGraph | Gremlin | Open, pluggable | Large-scale, distributed |
| TigerGraph | GSQL | Analytics | Real-time analytics |
Programming Frameworks
Python
| Library | Purpose |
|---|---|
| rdflib | RDF parsing, serialization, SPARQL |
| owlready2 | OWL reasoning, ontology manipulation |
| pyshacl | SHACL validation |
| SPARQLWrapper | Remote SPARQL endpoint queries |
| networkx | General graph algorithms |
| neo4j-python-driver | Neo4j connectivity |
# rdflib example
from rdflib import Graph, Namespace, RDF, RDFS, OWL
g = Graph()
ns = Namespace("http://example.org/")
g.add((ns.Person, RDF.type, OWL.Class))
g.add((ns.Employee, RDFS.subClassOf, ns.Person))
# Parse from file
g.parse("ontology.ttl", format="turtle")
# Query
results = g.query("""
SELECT ?class WHERE { ?class rdfs:subClassOf* ns:Person }
""")Java
| Library | Purpose |
|---|---|
| Apache Jena | Full RDF/OWL stack |
| OWL API | OWL ontology manipulation |
| RDF4J (Eclipse) | Storage, SPARQL, reasoning |
Linked Data Platforms
| Platform | Features |
|---|---|
| LOD Cloud | Linked open data catalog |
| DBpedia | Structured Wikipedia |
| Wikidata | Collaborative knowledge base |
| YAGO | Wikipedia + WordNet + GeoNames |
| BabelNet | Multilingual encyclopedic dictionary |
| BioPortal | Biomedical ontologies repository |
NLP for Knowledge Extraction
| Tool | Task | Model |
|---|---|---|
| spaCy | NER, parsing | en_core_web_trf (transformer) |
| Stanza | Multilingual NLP | BiLSTM + transformers |
| Hugging Face | General NLP | BERT, RoBERTa, custom |
| REBEL | Relation extraction | BART-based |
| OpenIE (Stanford) | Open relation extraction | Rule + ML hybrid |
| DBpedia Spotlight | Entity linking | TF-IDF + context |
Visualization Tools
| Tool | Graph Type | Interaction |
|---|---|---|
| WebVOWL | OWL ontologies | Web, export SVG |
| Cytoscape | General graphs | Desktop, highly customizable |
| D3.js | Custom | Web, code-based |
| yFiles | Enterprise graphs | Commercial, layout algorithms |
| Graphviz | Static diagrams | DOT language |
| Gephi | Large networks | Desktop, community detection |
Validation Tools
| Tool | Checks |
|---|---|
| OOPS! (OntOlogy Pitfall Scanner) | 21 common pitfalls |
| RDF Validator (W3C) | Syntax compliance |
| Protege Reasoner | Consistency, classification |
| SHACL Play | SHACL shape validation |
| VoID (Vocabulary of Interlinked Datasets) | Dataset metadata |
Testing Ontologies
Unit Tests for Ontologies
import unittest
from owlready2 import *
class TestOntology(unittest.TestCase):
def setUp(self):
self.onto = get_ontology("file://ontology.owl").load()
def test_consistency(self):
# All classes should be satisfiable
with self.onto:
sync_reasoner()
# If unsatisfiable classes exist, test fails
unsatisfiable = [c for c in self.onto.classes() if not c.instances()]
# Additional logic to check reasoner outputCompetency Question Tests
# Encode competency question as ASK/SELECT test
ASK {
?drug a ex:Drug .
?drug ex:interactsWith ?protein .
?protein ex:encodedBy ?gene .
FILTER (?gene = ex:BRCA1)
}
# Expected: true (if data supports)Cloud Services
| Service | Provider | Offering |
|---|---|---|
| Amazon Neptune | AWS | Managed graph (RDF + property) |
| Azure Cosmos DB | Microsoft | Gremlin API |
| Google Cloud | GCP | Neo4j on marketplace, custom |
| Ontotext Platform | Ontotext | GraphDB as a service |
| Stardog Cloud | Stardog | Managed knowledge graph |