Knowledge Graphs with MediaWiki Krabina IJCKG 2025

krabina 13 views 38 slides Oct 17, 2025
Slide 1
Slide 1 of 38
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38

About This Presentation

Presentation of using MediaWiki as platform for knowledge graphs at the IJCKG 2025
14th International Joint Conference on Knowledge Graphs, Industry track.

The talk argues that MediWiki - with certain extensions like Semantic MediaWiki or Wikibase - can be a great open-source platform for building ...


Slide Content

Knowledge Graphs
with MediaWiki
Bernhard Krabina, KM-A

„MEDIAWIKI IS THE BEST
OPEN-SOURCE-PLATFORM
FOR BUILDING AND CURATING
KNOWLEDGE GRAPHS“

Introduction
Managing partner at KM·A Knowledge
Management Associates
Active member of the Semantic
MediaWiki community ~ 15 years
Knowledge Graph researcher at WU
Vienna
Knowledge Management lecturer at
university of applied sciences
3
3
•KM consulting
•KM training
•KM research
•open-source SMW stack
•professional hosting

1
2
3
Agenda
Knowledge graphs in MediaWiki
Semantic MediaWiki
Use Cases: SMW or Wikibase or
something new?

Wikipedia – Wikimedia – MediaWiki
Encyclopedia Operator Software
5

A scientific definition (Paulheim 2016)
A knowledge graph
•mainly describes real world entities
and their interrelations, organized in a
graph,
•defines possible classes and relations
of entities in a schema,
•allows for potentially interrelating
arbitrary entities,
•covers various topical domains.
in MediaWiki
•real world entities = wiki pages
•classes = categories and relations of
entities = properties,
•interrelating entities = linking
•wiki topic

Structures in MediaWiki
▪Formatted text (Headings, numerations, paragraphs, quotes)
▪Templates
▪Pages and subpages
▪Namespaces
▪Categories and subcategories
▪Category „inflation“
▪Manually curated lists
▪No querying of data inside MediaWiki

Knowledge Graphs and Wikipedia
vs. customKG
•extract structured information from Wikipedia and make
this information available on the Web
8
▪free knowledge base that can be read and edited by
humans and machines alike… central storage for the data
that may be accessed by the client Wikipedias
▪turns MediaWiki into a powerful and flexible knowledge
management system
▪lets you store and query data within the wiki's pages
▪a set of extensions for MediaWiki

MediaWiki + SMW + more extensions
•collaborative editing
•version history of every edit
•no backend:
everything is a wiki page
•structure via categories and
namespaces
•API
•…
•structured data
(Web database)
•result lists and formats
via {{#ask:}} queries
•Semantic Web standards
•triple store support
•…
•online forms for data entry
•more visualizations
•responsive skin
•authentication
•image annotation
•SPARQL
•…
9

Options

Knowledge Graph?
Storage of data MW database,
ElasticSearch,
TripleStores (incl.
Blazegraph)
MW database,
Blazegraph
MW database MW database
Properties flexible defined before
usage, unchangeable
no properties, but
table fields
defined through
JSON-schema
Queries parser function, API,
TripleStore (SPARQL)
API,
TripeStore (SPARQL)
parser function, APIparser function, API
Linking Data RDF, importing
ontologies
RDF, reusing
Wikidata ontology
- -
Knowledge Graph   
would need RDF or
JSON-LD

would need RDF or
JSON-LD

Semantic MediaWiki or Wikibase?
https://www.mediawiki.org/wiki/Manual:Managing_data_in_MediaWiki
Semantic MediaWiki Wikibase
flexible data model data model of Wikidata
properties can be pre-defined or declared by annotatingproperties need to be pre-defined
properties (and datatypes) can be changed any timeproperties cannot be changed!
requires extensions for form-based input comes with a fixed, built-in edit interface
SPARQL only with external triplestore
internal query language (easier than SPARQL) no built-in querying of data
12

1
2
3
Agenda
Knowledge graphs in MediaWiki
Semantic MediaWiki
Use Cases: SMW or Wikibase or
something new?

What is Semantic MediaWiki (SMW)?
•open source project:
–www.semantic-mediawiki.org
–https://github.com/SemanticMediaWiki
•the „Swiss army knife“ for data and semantics
•built on the MediaWiki ecosystem:
the wiki engine that powers Wikipedia
can be used for much more than just wikis…
14

Building your Knowledge Base in SMW
•page Vienna can have properties
–number of inhabitants, located in,
coordinates, WikidataID, …
•properties can have various data types
–page, text, number, date, URL, …
–external identifier links to external resources
•re-use external vocabularies
–“Coordinates” imported from schema:geo
•a page should be put into a category
–Also category pages should re-use vocabularies:
{{#set:Imported from=schema:City}}
15

Using External Vocabularies
1.Add/edit a page
MediaWiki:Smw import schema
2.Instead of local datatype declarations, use
{{#set:Imported from=schema:geo}}
on the property page (e. g. Property:Coordinates)
instead of {{#set:Has type=Geographic coordinates}}
Add (or remove) vocabulary
terms any time…

Linking to external identifiers
▪Define a property
▪Assign datatype „External identifier“
–Links to external ids
{{#set:Has type=External identifier
|External formatter uri=
http://www.wikidata.org/entity/$1}}
▪Look for other identifiers
–ORCID https://orcid.org/
–GND
–…..
Even better, use Schema.org:
{{#set:Imported from::schema:sameAs}}

Internal query language
18
{{#ask:
[[Category:Practices]]
[[Country::Austria]]
|?Organisation
|?Coordinates
|format=table
}}

Internal query language
{{#ask:
[[Category:Practices]]
[[Country::Austria]]
|?Organisation
|?Coordinates
|format=map
}}
19

> 70 result formats, supporting
MediaWiki templates
|format=moderntimeline
|format=calendar
|format=median
|format=D3chart
|format=gantt
|format=tagcloud
|format=json
|format=rdf
|format=bibtex

20

Semantic MediaWiki storage options
SQL Store (default)
•extra tables in the
SQL store of
MediaWiki
ElasticStore
•search engine
SPARQL/RDF Store
•custom, default
•Virtuoso
•Blazegraph
•Fuseki
•Sesame
•4store
21
easy (to install) harder to install but more powerful

1
2
3
Agenda
Knowledge graphs in MediaWiki
Semantic MediaWiki
Use Cases: SMW or Wikibase or
something new?

Vienna History Wiki geschichtewiki.wien.gv.at

Literature: doi.org/10.1016/j.websem.2022.100771

FINA: fina.oeaw.ac.at
▪Austrian Academy of
Sciences
▪https://fina.oeaw.ac.at
▪Correspondence of
scholars from 16th to
18th century (1440 –
1820)

FINA: Correspondence

FINA: Person

SILVER Wiki: silver.kbr.be
▪Royal Library of
Belgium(KBR)
▪Database of die-studies
for the Graeco-Roman
world. Estimate the
volume of ancient coin
production.
▪Greek Overstrikes
Database: known
overstrikes for the
Greek world

Overstrike

Literature

REGEST: wiki.uibk.ac.at/regest
▪University ofInnsbruck
▪https://wiki.uibk.ac.at/regest/
▪theological literature
translated from Greek to
Slavonic, starting from the
beginning of Slavonic literacy
in the 9th century until the
Ottoman conquest of the
Balkans in the 14th century.

Authors

Work

CONCLUSION

1
2
Let’s collaborate on the future of SMW!
•Get involved in the SMW community:
www.semantic-mediawiki.org
•Join our Github account:
https://github.com/SemanticMediaWiki/
•Join mailing lists: https://www.semantic-
mediawiki.org/wiki/Semantic_MediaWiki_mailing_li
sts
•Element/Matric/Telegram chat
https://t.me/joinchat/MCG84k3OMoaYZoFA9yhyMg
•Social Media channels (Twitter, Mastodon, LinkedIn,
Facebook, YouTube)
•Join the MWStakeholder‘s Group: www.mwstake.org

„MediaWiki is the best open-Source-Platform for
Building and curating knowledge graphs“
▪because of the transparency of every edit
▪because of the great API
▪because of the sustainable open-source ecosystem
▪because knowledge graphs should not be only about facts, but also about texts
▪with SMW: because it can handle not only structured data, but also text alongside the
data in a very flexible way
▪with SMW: because it can serve as an interface to the knowledge on a website, not only
as a SPARQL endpoint
▪with Wikibase: because it has the user interface of Wikidata if you need this for your use
case
▪with Wikibase: because it is better to bundled ready to be used
▪with a new solution: because it will be awesome! https://doi.org/10.3030/101233096

MediaWiki Users & Developers
Conference, October 28-30, 2025
Hanover, Germany
https://www.mediawiki.org/wiki/MediaWiki_Users_and_Developers_Conference_Fall_2025

38
KM-A Knowledge Management Associates | Gersthofer Straße 162 | A-1180 Wien | [email protected] | www.km-a.net
38
▪Knowledge Management
▪Wiki consulting, Semantic MediaWiki
▪Open Government, Open Data
Bernhard Krabina
+43 676 5103593
[email protected]
linkedin.com/in/krabina
@krabina