Africa Bitext Builder¶
Africa Bitext Builder is a Python library for discovering, inspecting, and compiling sentence-aligned parallel and monolingual text corpora across 690+ African languages.
The library pairs African languages with English, French, Arabic, Portuguese, and Chinese, or directly aligns two African languages (e.g., Twi ↔ Yoruba, Hausa ↔ Amharic).
Core Principles¶
- Explicit Licensing Enforcement: Defaults strictly to verified Public Domain (PD) and Creative Commons (CC) translations.
- On-Demand Dataset Streaming: Data is downloaded only when requested from Hugging Face (
AfriSpeech/africa-corpus) and cached locally. - Canonical Alignment: Verses are matched deterministically using canonical scripture identifiers (
GEN.1.1toREV.22.21). - Fast Discovery: Look up translation metadata, country distributions, and licensing across hundreds of dialects in constant time.
Installation¶
Install the latest published version directly from PyPI:
Next Steps¶
- Language & License Discovery: Learn how to query ISO codes, verify Public Domain availability, and search by country or abbreviation.
- Compiling Corpora: Configure parallel extraction, apply random sampling, and export CSV files.
- API Reference: Detailed docstring references for
LanguageRegistryandCorpusBuilder.