Update Tsonga dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ts
|
| 4 |
+
license: cc-by-sa-3.0
|
| 5 |
+
pretty_name: Plaintext Wikipedia (Tsonga)
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# Plaintext Wikipedia (Tsonga)
|
| 9 |
+
|
| 10 |
+
Compressed plaintext articles from [Tsonga Wikipedia](https://dumps.wikimedia.org/tswiki/latest). One current main-namespace revision per non-redirect article; titles and cleaned text are stored as UTF-8 in independent gzip shards.
|
| 11 |
+
|
| 12 |
+
**Produced and maintained by [cheeseonamonkey/PlainTextWikipedia](https://github.com/cheeseonamonkey/PlainTextWikipedia).**
|
| 13 |
+
|
| 14 |
+
**Build status: COMPLETE — 1/1 root shards recovered (1 leaf archives).** All planned page ranges recovered.
|
| 15 |
+
|
| 16 |
+
## Format
|
| 17 |
+
|
| 18 |
+
Each `.txt.gz` shard has three lines per article (title, single-line body, blank separator):
|
| 19 |
+
|
| 20 |
+
```text
|
| 21 |
+
Article title
|
| 22 |
+
Cleaned article body
|
| 23 |
+
|
| 24 |
+
Next title
|
| 25 |
+
Next article body
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
Shard files are normally named `tswiki_01_of_NN.txt.gz`, etc. If one shard fails, recovery splits it into named halves like `tswiki_01a_of_NN.txt.gz` and `tswiki_01b_of_NN.txt.gz`; a failing half can split again (`01ba`, `01bb`, etc.). Only successful, non-overlapping leaves are published.
|
| 30 |
+
|
| 31 |
+
The machine-readable coverage file `data/build-manifest.json` records which roots and subranges completed. Always check its `complete` flag before treating a dataset as exhaustive. These are raw text archives, **not** structured rows with `title` and `body` fields in the Hugging Face `datasets` API.
|
| 32 |
+
|
| 33 |
+
## Example: download and read
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
import gzip
|
| 37 |
+
from huggingface_hub import HfApi, hf_hub_download
|
| 38 |
+
|
| 39 |
+
repo = "ffatty/plaintext-wikipedia-full-tsonga"
|
| 40 |
+
files = sorted(
|
| 41 |
+
path for path in HfApi().list_repo_files(repo, repo_type="dataset")
|
| 42 |
+
if path.startswith("data/") and path.endswith(".txt.gz")
|
| 43 |
+
)
|
| 44 |
+
path = hf_hub_download(repo, filename=files[0], repo_type="dataset")
|
| 45 |
+
|
| 46 |
+
with gzip.open(path, "rt", encoding="utf-8") as stream:
|
| 47 |
+
title = stream.readline().rstrip("\n")
|
| 48 |
+
body = stream.readline().rstrip("\n")
|
| 49 |
+
print(title, body[:200])
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Sources and attribution
|
| 53 |
+
|
| 54 |
+
1. [cheeseonamonkey/PlainTextWikipedia](https://github.com/cheeseonamonkey/PlainTextWikipedia) — maintained converter and publisher.
|
| 55 |
+
2. [daveshap/PlainTextWikipedia](https://github.com/daveshap/PlainTextWikipedia) — original upstream project (unmaintained).
|
| 56 |
+
3. [Wikimedia dumps](https://dumps.wikimedia.org/tswiki/latest) — article source.
|
| 57 |
+
|
| 58 |
+
Wikipedia content is released under Creative Commons Attribution-ShareAlike (CC BY-SA); the conversion code is MIT licensed. Follow the applicable Wikimedia reuse requirements, including author attribution.
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
Generated by [cheeseonamonkey/PlainTextWikipedia](https://github.com/cheeseonamonkey/PlainTextWikipedia). Source data: Wikimedia dumps.
|