Observed since 20 Oct, 21:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Discovery, licensing verification, and bitext builder across 690+ African languages.
Africa Bitext Builder is a Python library for discovering, inspecting, and compiling sentence-aligned parallel and monolingual text corpora across 690+ African languages.
Use the LanguageRegistry class to inspect supported languages, available translations, and their licensing status:
from africa_bitext_builder.registry import LanguageRegistry
reg = LanguageRegistry()
# Check if a language is supported by its ISO-639 code
swh = reg.resolve("swh")
print(swh)
# <Language code='swh' name='Swahili' region='African' versions=13 (PD: 0)>
# Inspect Public Domain vs. copyrighted translations
print("Public Domain versions:", [v.id for v in swh.public_domain_versions])
print("All available versions:", [v.id for v in swh.bible_versions])
When the requested languages have verified Public Domain versions available (e.g., Twi ↔ English), simply pass the language codes:
from africa_bitext_builder.builder import CorpusBuilder
builder = CorpusBuilder(
source_lang="twi",
target_lang="en",
limit=5000,
)
# Saves automatically to 'corpora/twi_en_parallel.csv'
out_file = builder.download("corpora/")
print(f"Saved: {out_file}")
If a language has no Public Domain versions available (such as Swahili), or you require a specific translation, you may explicitly pass version IDs discovered via the registry:
from africa_bitext_builder.builder import CorpusBuilder
# Explicitly selecting Swahili (ID: 1627) and French Louis Segond 1910 (ID: 93 - PD)
builder = CorpusBuilder(
source_lang="swh",
target_lang="fr",
source_version_ids=[1627], # Explicit opt-in
target_version_ids=[93], # French Louis Segond (PD)
limit=1000,
sample=True,
seed=42,
)
# Provide a specific .csv file path or a directory path
out_file = builder.download("data/corpora/swahili_french.csv")
print(f"Saved: {out_file}")
Extract deduplicated sentences for a single language:
from africa_bitext_builder.builder import CorpusBuilder
builder = CorpusBuilder(
source_lang="amh",
source_version_ids=[206], # Explicit version opt-in
mode="monolingual",
limit=5000,
)
out_file = builder.download("corpora/amharic.csv")
By default, this library restricts corpus construction exclusively to verified Public Domain (PD) and Creative Commons translations.
CorpusBuilder will refuse to run by default, in order to prevent unintentional copyright infringement.source_version_ids or target_version_ids) may be explicitly specified using metadata retrieved via LanguageRegistry.Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.13 | 21 Aug 2026 | 5 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 21:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:59d13f7ec1229f709c86f40cad03b205105a7b056dc5e177553047b69994b585