Various data and utilities for processing wikitext.
Project description
mwconstants
Various utilities and constants useful for analyses of wikitext. This package contains three types of artifacts:
- Data generating functions: Python functions for calling various APIs to build useful data structures -- e.g., all Wikipedia language codes
- Static data snapshots: Python variables that contain the most recent result of a data generating function
- Utilities: Python functions for handling various wikitext-related processing tasks -- e.g., mapping links to namespaces.
Modules
All modules generally contain relevant constants, functions for generating those constants, and other useful utilities for manipulating them:
languages.py
: functions for identifying languages associated with a given Wikimedia project.media.py
: functions for identifying media in wikitext and parsing wikitext media syntax into its componentsnamespaces.py
: functions for identifying namespace prefixes
Limitations
- Links have many edge-cases, especially around interwiki prefixes. For now, just the basics are covered: language-specific namespaces and interlanguage links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mwconstants-0.0.1.tar.gz
(96.5 kB
view hashes)
Built Distribution
Close
Hashes for mwconstants-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ca865ae03263a9dfacd5d6fc3891f6d77a0493e46abe01ae57a3cb44b324b21 |
|
MD5 | 0eabf8f65c9553c94f645763b44d2237 |
|
BLAKE2b-256 | 9bfb688c704fe572ee9be60fc5ce6e85e2e216fbe57bcc8532e1cdd80ef0bf20 |