Bindings to a rust library that can help process wikipedia's data dumps.
Project description
Wikicleaner
Wikipedia provides a series of dumps in XML format. While developing this project, I personally used the simple wiki dumps.
Purpose
The intent of this project is to provide some low-level routines that allow us to manipulate the content of XML dumps. One such routine removes all of the annotations like [[File:*]]
and {{some metadata}}
in order to make our input more digestible for an AI application that uses embeddings.
Example Usage
>>> import wikicleaner as wc
>>> article_raw_text = "[[File:Colorful spring garden.jpg|thumb|180px|right|[[Spring]] flowers in April in the [[Northern Hemisphere]].]] April comes between [[March]] and [[May]]"
>>> wc.strip_file_annotations(article_raw_text)
' April comes between March and May'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wikicleaner-0.1.4.tar.gz
(14.5 kB
view hashes)
Built Distribution
Close
Hashes for wikicleaner-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35133a6fac16ad9b16acc2922c7d6aa0f44bc507fa5f2a42471b83b3093eb9fb |
|
MD5 | 69f10a029e27058cd7057bf78d47945f |
|
BLAKE2b-256 | 3f76e4136c754116aa1eae5cf70188758cd13cedc8f03cb661a83c01f6fc5b74 |