File size: 2,640 Bytes
ddb76a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
language:
- ts
license: cc-by-sa-3.0
pretty_name: Plaintext Wikipedia (Tsonga)
---

# Plaintext Wikipedia (Tsonga)

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.

**Produced and maintained by [cheeseonamonkey/PlainTextWikipedia](https://github.com/cheeseonamonkey/PlainTextWikipedia).**

**Build status: COMPLETE — 1/1 root shards recovered (1 leaf archives).** All planned page ranges recovered.

## Format

Each `.txt.gz` shard has three lines per article (title, single-line body, blank separator):

```text
Article title
Cleaned article body

Next title
Next article body

```

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.

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.

## Example: download and read

```python
import gzip
from huggingface_hub import HfApi, hf_hub_download

repo = "ffatty/plaintext-wikipedia-full-tsonga"
files = sorted(
    path for path in HfApi().list_repo_files(repo, repo_type="dataset")
    if path.startswith("data/") and path.endswith(".txt.gz")
)
path = hf_hub_download(repo, filename=files[0], repo_type="dataset")

with gzip.open(path, "rt", encoding="utf-8") as stream:
    title = stream.readline().rstrip("\n")
    body = stream.readline().rstrip("\n")
    print(title, body[:200])
```

## Sources and attribution

1. [cheeseonamonkey/PlainTextWikipedia](https://github.com/cheeseonamonkey/PlainTextWikipedia) — maintained converter and publisher.
2. [daveshap/PlainTextWikipedia](https://github.com/daveshap/PlainTextWikipedia) — original upstream project (unmaintained).
3. [Wikimedia dumps](https://dumps.wikimedia.org/tswiki/latest) — article source.

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.

---
Generated by [cheeseonamonkey/PlainTextWikipedia](https://github.com/cheeseonamonkey/PlainTextWikipedia). Source data: Wikimedia dumps.