Tuvima.Wikidata.AspNetCore 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tuvima.Wikidata.AspNetCore --version 1.0.0
                    
NuGet\Install-Package Tuvima.Wikidata.AspNetCore -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tuvima.Wikidata.AspNetCore" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tuvima.Wikidata.AspNetCore" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Tuvima.Wikidata.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tuvima.Wikidata.AspNetCore --version 1.0.0
                    
#r "nuget: Tuvima.Wikidata.AspNetCore, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tuvima.Wikidata.AspNetCore@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tuvima.Wikidata.AspNetCore&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Tuvima.Wikidata.AspNetCore&version=1.0.0
                    
Install as a Cake Tool

Tuvima.Wikidata

A .NET library for working with Wikidata and Wikipedia. It matches text to Wikidata entities, fetches structured data, retrieves Wikipedia content, and provides lightweight in-memory entity graph traversal — all with zero external dependencies.

In plain English: You have author names, book titles, or company names. This library figures out which Wikidata item each one refers to, gives you a confidence score, and then lets you enrich your data with everything Wikidata and Wikipedia know about those entities. It can also map relationships between entities — family trees, connection paths, and cross-media appearances — without needing a heavy graph database.

This is the first .NET Wikidata reconciliation library, filling a gap in the ecosystem where only Python and JavaScript implementations previously existed.

Who Is This For?

  • Data engineers cleaning and linking datasets to structured identifiers
  • App developers building search, autocomplete, or knowledge-powered features
  • Library/archive systems matching catalog records to authority files (VIAF, ISNI, LoC)
  • Research teams enriching study data with Wikidata's 100M+ items
  • Content platforms pulling plot summaries, biographies, or descriptions from Wikipedia
  • Media applications traversing entity relationships — family trees, character connections, cross-media appearances
  • Anyone who needs to go from messy text to structured, linked data

What Can It Do?

You have... The library gives you...
A name like "Douglas Adams" The Wikidata ID (Q42), confidence score, and auto-match flag
A matched entity (Q42) Date of birth, nationality, works, identifiers, Wikipedia link, profile image
A Wikipedia article Section table of contents, and any section's content as plain text
An ISBN or IMDB ID The matching Wikidata entity, without fuzzy matching
A list of 10,000 names Parallel batch processing with progress streaming
A prefix like "Doug..." Autocomplete suggestions for interactive UIs
A name with diacritics like "Shogun" Matches regardless of accents with diacritic-insensitive mode
A work like "Hitchhiker's Guide" All editions and translations, filterable by type (audiobook, paperback, etc.)
A query in Japanese and English Multi-language search that finds the best match across both languages
Cached entity data Lightweight staleness check — only re-fetch what actually changed
A set of related entities Pathfinding, family trees, and cross-media entity detection via in-memory graph

Packages

Package Purpose
Tuvima.Wikidata Core library — reconciliation, entity data, Wikipedia content, graph traversal
Tuvima.Wikidata.AspNetCore ASP.NET Core middleware for hosting a W3C Reconciliation Service API

Installation

dotnet add package Tuvima.Wikidata

Targets: .NET 8.0 (LTS) and .NET 10.0

Dependencies: None beyond System.Text.Json (built into .NET). AOT compatible and trimmable.

Quick Start

using Tuvima.Wikidata;

using var reconciler = new WikidataReconciler();

// Match text to a Wikidata entity
var results = await reconciler.ReconcileAsync("Douglas Adams");

Console.WriteLine(results[0].Id);          // "Q42"
Console.WriteLine(results[0].Name);        // "Douglas Adams"
Console.WriteLine(results[0].Description); // "English author and humourist (1952-2001)"
Console.WriteLine(results[0].Score);       // 100
Console.WriteLine(results[0].Match);       // true (confident auto-match)
using Tuvima.Wikidata.Graph;

// Build an entity graph from your data
var graph = new EntityGraph(nodes, edges);

// Find how two characters are connected
var paths = graph.FindPaths("Q937618", "Q312545");

// Build a family tree
var tree = graph.GetFamilyTree("Q937618", generations: 3);

// Find characters appearing in multiple works
var crossMedia = graph.FindCrossMediaEntities(minWorks: 2);

Features

Reconciliation

Match text to Wikidata entities with dual-search, fuzzy matching, type filtering, property constraints, and confidence scoring.

Reconciliation guide — type filtering, property constraints, batch processing, streaming, scoring breakdown

Entity Data & Wikipedia Content

Fetch structured entity data, Wikipedia summaries and sections, images, revision history, editions, and child entities.

Entity data guide — entity fetching, Wikipedia content, staleness detection, edition discovery, child entities

Graph Traversal

Lightweight in-memory entity graph for pathfinding, family trees, cross-media detection, and subgraph extraction. Pure C# with adjacency lists — no RDF or SPARQL dependencies.

Graph module guide — building graphs, pathfinding, family trees, cross-media entities, subgraphs

ASP.NET Core Integration

Host a W3C Reconciliation Service API compatible with OpenRefine and Google Sheets.

ASP.NET Core guide — DI registration, endpoint mapping, service manifest

Configuration

Tune scoring, concurrency, language, type hierarchy, and HTTP behavior.

Configuration guide — all options, caching, custom HttpClient, custom Wikibase instances

Architecture

The reconciliation pipeline has four stages: dual search, entity fetching, weighted scoring, and type filtering.

Architecture overview — pipeline stages, internal components, design decisions

What's New in v1.0.0

  • Renamed from Tuvima.WikidataReconciliation — package name now reflects the library's full scope: reconciliation, entity data, Wikipedia content, and graph traversal
  • Graph module — new Tuvima.Wikidata.Graph namespace with EntityGraph for in-memory entity graph traversal (pathfinding, family trees, cross-media detection, neighbor lookup, subgraph extraction). Zero dependencies, AOT compatible.
  • v1.0.0 stability — signals production readiness after 10 minor versions of real-world use

See the changelog for the full version history.

Acknowledgements

The reconciliation algorithms in this library (dual-search strategy, scoring formula, fuzzy matching approach, type checking, and property matching) are based on openrefine-wikibase by Antonin Delpeuch, licensed under the MIT License.

Antonin Delpeuch. "A survey of OpenRefine reconciliation services." arXiv:1906.08092

The configurable Wikibase endpoint support was informed by the nfdi4culture fork.

The graph module's use cases (pathfinding, family trees, cross-media entity detection) were originally implemented using dotNetRDF in a consuming application. This module provides a lightweight, dependency-free reimplementation of those specific operations.

This is an independent C# implementation. No code was copied from the original projects. See the NOTICE file for full attribution details.

License

MIT. See LICENSE for the full text.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.0 90 5/24/2026
3.0.3 92 5/23/2026
3.0.2 95 5/5/2026
3.0.1 93 5/4/2026
3.0.0 101 5/1/2026
2.6.0 90 5/1/2026
2.5.0 102 4/23/2026
2.4.1 98 4/8/2026
2.4.0 106 4/8/2026
2.3.0 101 4/8/2026
1.0.0 144 4/3/2026