A simple map for urls of definitions in notable sources.

concept-mapping, namespacing, url-shortener
pip install metawiki==0.1.13



Namespaces are one honking great idea -- let's do more of those!

In order to refer to a concept unambiguously, these days, it is easiest to use URL to a dictionary word online. However, these URLs are long. Using a hash function or compressor like md5, zlib, etc. for URLs are not convenient, because results are not human-readable.


It makes sense to define a specific MAP function, that implements a namespace to refer to all concepts on the web. Mostly, concepts are defined on wikis, so call it - metawiki.

pip install metawiki

>>> from metawiki import (

GitHub wikis (GH namespace)

All wikis of GitHub repositories under users and organizations.

>>> url2name('https://github.com/infamily/indb/wiki/percent-change#1hourly')

>>> name2url('GH:infamily/terms/level')

In addition, namespace GHF also exists, to refer to files on GitHub repositories:

>>> url2name('https://github.com/wefindx/metawiki/metawiki/map.py')

>>> name2url('GHF:wefindx/metawiki/metawiki/map.py')

The reason we use / instead of . for namespacing in each source, is because this makes it usable as keys in the key-value databases, that rely on . for queries.

The general resulting pattern, is, e.g.:


# E.g.
GH:nasa/terms/precession#<some metric or measure>

Wikidata (WD namespace)

The Wikidata namespace. All concepts and relations from WikiData.

>>> url2name('https://www.wikidata.org/wiki/Q1347367')

>>> name2url('WD:Q1347367')

>>> url2name('https://www.wikidata.org/wiki/Property:P31')

LOV (a-loc..zbwext namespaces)

The LOV namespaces. (Most of the semantic web, as defined through RDF initiative.)

Get the newest after importing metawiki with metawiki.data.update_lov().

Feel free to PR, to extend the map.