Jump to content

Wikidata:WikiProject zelph

From Wikidata


Description

[edit]

WikiProject zelph focuses on integrating a semantic network system with Wikidata to enhance data quality through advanced contradiction detection and inference capabilities. The project leverages zelph's ability to import the complete Wikidata knowledge graph and apply inference rules to detect logical inconsistencies and generate new conclusions. zelph is in beta (version 0.9.6), with significant improvements in performance and scalability, enabling full Wikidata processing on a single machine.

Key achievements include targeted reports on Wikidata violations (e.g., Split Order Classes, Disjointness, Mereology), a framework for converting property constraints into zelph rules, and — as of version 0.9.6 — support for a substantial SPARQL subset with native transitive closures, plus import of Wikidata statement qualifiers as first-class graph structure. This makes the disjointness-violation queries from Doğan & Patel-Schneider (2024) run verbatim on a local machine, including query shapes that time out on public SPARQL endpoints. For detailed documentation, see the main project site at zelph.org.

Main Goals

[edit]
  • Develop tools for real-time contradiction detection in Wikidata editing workflows
  • Generate reports of direct logical violations to support community curation
  • Align zelph's inference rules with Wikidata Usage Instructions and Property Constraints
  • Build qualifier-dependent property-constraint checking on top of the new qualifier import (e.g. Property Scope, item-requires-statement)
  • Optimize for community use, including serialized binaries and sharded, partially loadable networks for offline analysis

Technical Information

[edit]

zelph is an open-source C++ library with a unique semantic network approach where inference rules are embedded in the network itself. It supports multithreading, a 1000x faster reasoning engine compared to the version prior the first grant, native transitive closure support with persistent per-predicate adjacency indexes, and RAM-optimized structures (~224 GiB for the full March 2026 Wikidata dump; ~15 GiB for the pruned version). Since version 0.9.6, networks can also be loaded partially — including on-demand fetching of individual shards from remote storage — so that targeted analyses no longer require materializing the full graph. Binaries, including qualifier-extended variants, are available on Hugging Face for easy reuse.

The transitive reasoning, qualifier support, and SPARQL-subset integration were funded by a second Wikimedia Rapid Fund grant.

Tools and Resources

[edit]

Current Tools

[edit]
  • zelph CLI: Command-line interface for semantic networks, including Wikidata import and inference
  • Wikidata Import: Handles full JSON dumps with binary serialization for fast loading
  • SPARQL Interface: Query any zelph network with a substantial subset of standard SPARQL (basic graph patterns, transitive property paths such as wdt:P279+, OPTIONAL, MINUS, UNION, FILTER, subqueries, aggregation); see documentation
  • Qualifier Import: Imports Wikidata's statement/qualifier layer as reified statements built from ordinary nodes and facts (p:/ps:/pq:/wikibase:rank), making e.g. disjointness definitions (P2738 with P11260 qualifiers) directly queryable; see documentation
  • Transitive Reasoning: Native transitive closures with persistent adjacency indexes, enabling deep-hierarchy analyses that time out on public SPARQL endpoints
  • Sharding & Partial Loading: Load only selected parts of a network, locally or on demand from Hugging Face, without downloading multi-gigabyte files first (contributed by chboishabba); see documentation
  • Constraint Framework: Converts selected property constraints (e.g., conflicts-with, none-of) into rules; generated 8,709 rules from the January 2025 dump
  • Violation Reports: Static dashboards for detected issues, e.g., Split Order Classes and Constraint Violations (downloadable full lists)

Planned Tools

[edit]
  • Wikidata Browser Gadget: Real-time warnings for inconsistencies during edits
  • Qualifier-Dependent Constraints: Extend the constraint converter to the majority of property constraints, which are defined via qualifiers (e.g. Property Scope Q53869507) — the new qualifier import already turns their definitions into queryable graph structure
  • Expanded Constraint Converter: Implement more constraint types with community input

Queries

[edit]

For examples of zelph's native query syntax and how to perform queries, see the tutorial at [2]. Standard SPARQL queries — for example those from the Wikidata Query Service — are supported as well; see SPARQL Queries.

Participants

[edit]

Community members from the Wikidata Ontology Cleaning Task Force and Mereology Task Force are actively involved through weekly discussions. Join via the project talk page or linked resources.

[edit]