ghana-corpus
收藏资源简介:
Ghana Corpus是一个多语言平行语料数据集,专门针对加纳本土语言及多种世界语言构建。该数据集的核心内容来源于公开的圣经翻译文本(取自YouVersion),并按照经文节进行精确对齐,使得任意两种语言之间均可形成平行语料对。数据集包含多种加纳语言(如Twi、Ewe、Gaa、Dag、Fante、Adangme、Gonja、Dagaare、Nzema、Abron)以及英语、法语、西班牙语、葡萄牙语、德语、意大利语、阿拉伯语、中文和斯瓦希里语。数据以CSV文件格式组织,分为三个配置视图:ghanaian配置包含加纳语言文件,字段包括verse_key(经文键)、version_id(版本ID)、eng(英语文本)和local(本地语言文本);english配置为英语缓存文件,包含verse_key和eng字段;reference配置为参考缓存文件,包含verse_key、version_id、lang_code(语言代码)和text(文本)字段。所有文件通过共享的verse_key列实现跨语言对齐,支持构建加纳语↔英语、加纳语↔加纳语、加纳语↔其他语言的双语平行语料库,也可用于构建任何单一语言的单语语料库。该数据集旨在支持机器翻译、文本生成等自然语言处理任务,尤其适用于低资源语言的研究与应用。数据集由Ghana NLP社区构建,鼓励在使用时引用该社区并注明底层圣经翻译来源。
Ghana Corpus is a multilingual parallel corpus dataset specifically designed for Ghanaian local languages and various world languages. The core content of this dataset is derived from publicly available Bible translation texts (taken from YouVersion) and is precisely aligned by verse, enabling parallel corpus pairs between any two languages. The dataset includes multiple Ghanaian languages (such as Twi, Ewe, Gaa, Dag, Fante, Adangme, Gonja, Dagaare, Nzema, Abron) as well as English, French, Spanish, Portuguese, German, Italian, Arabic, Chinese, and Swahili. The data is organized in CSV file format, divided into three configuration views: the ghanaian configuration includes Ghanaian language files with fields such as verse_key (verse key), version_id (version ID), eng (English text), and local (local language text); the english configuration is an English cache file containing verse_key and eng fields; the reference configuration is a reference cache file containing verse_key, version_id, lang_code (language code), and text fields. All files are aligned across languages through the shared verse_key column, supporting the construction of bilingual parallel corpora (e.g., Ghanaian ↔ English, Ghanaian ↔ Ghanaian, Ghanaian ↔ other languages) and monolingual corpora for any single language. This dataset aims to support natural language processing tasks such as machine translation and text generation, particularly for low-resource language research and applications. The dataset is built by the Ghana NLP community, and users are encouraged to cite the community and acknowledge the underlying Bible translation sources when using it.
Ghana Corpus 数据集概述
基本信息
- 数据集名称:Ghana Corpus
- 许可证:other(需遵守 YouVersion 服务条款)
- 语言:覆盖加纳本地语言(Twi、Ewe、Gaa、Dag、Fat、Ada、Gjn、Kdh、Nzi、Abr)及世界语言(英语、法语、西班牙语、葡萄牙语、德语、意大利语、阿拉伯语、中文、斯瓦希里语)
- 任务类别:翻译、文本生成
- 多语言性质:多语言、翻译
- 标签:加纳、加纳语言、低资源、平行语料、机器翻译、圣经
数据集结构
数据集基于圣经译本构建,所有语言通过共享的 verse_key(如 JHN.3.16)进行对齐。包含三个配置:
| 配置 | 文件模式 | 列 |
|---|---|---|
ghanaian |
{Language}_{code}_v{id}.csv |
verse_key, version_id, eng, local |
english |
english_cache.csv |
verse_key, eng |
reference |
reference_caches/{Language}_{code}_v{id}.csv |
verse_key, version_id, lang_code, text |
主要用途
- 平行语料:任意两种语言可通过
verse_key对齐为平行语料- 加纳语 ↔ 英语(默认配对)
- 加纳语 ↔ 加纳语(如 Twi ↔ Ewe)
- 加纳语 ↔ 其他世界语言(法语、西班牙语等)
- 单语语料:可用于任何单一语言的文本生成任务
使用方式
推荐方式:通过 Ghana Corpus Builder 库
bash git clone https://github.com/GhanaNLP/ghana-corpus-builder.git cd ghana-corpus-builder
Twi ↔ 英语
python ghana_corpus.py --source twi
Twi ↔ Ewe,随机抽取5000对样本
python ghana_corpus.py --source twi --target ewe --limit 5000 --sample
单语 Twi
python ghana_corpus.py --source twi --monolingual
列出所有可用语言
python ghana_corpus.py --list
直接加载 CSV
python from huggingface_hub import hf_hub_download import pandas as pd path = hf_hub_download("ghananlpcommunity/ghana-corpus", "Ewe_ewe_v1613.csv", repo_type="dataset") df = pd.read_csv(path)
数据来源与许可
- 来源:公开的圣经译本,来自 YouVersion
- 引用:若用于研究,请引用 Ghana NLP Community 并致谢圣经翻译来源
- 代码许可:MIT 许可证(详见 GitHub 仓库)
语言识别
reference配置包含lang_code列直接标识语言- 加纳语行的
version_id可通过youversion_ghana_versions.csv映射到具体语言(文件地址:https://github.com/GhanaNLP/ghana-corpus-builder/blob/main/youversion_ghana_versions.csv)




