mtob
收藏资源简介:
MTOB for Code-LLaVA是一个用于低资源语言Kalamang与英语之间翻译任务的数据集。它包含两种配置:'memwrap'和'plain',分别表示带有和不带有记忆标记的语法教科书内容。数据集的结构包括prompt、category和extra_info等字段,其中extra_info包含ground_truth和scoring_function等信息。数据集的使用和评估方法也进行了详细说明,包括如何加载数据集、过滤数据以及评估翻译质量的指标。此外,数据集还提供了语法教科书和双语词汇表,用于支持Kalamang的语言规则和单词级翻译。
MTOB for Code-LLaVA is a dataset dedicated to the translation task between the low-resource language Kalamang and English. It features two configurations: 'memwrap' and 'plain', which respectively denote grammar textbook content with and without memory markers. The dataset structure includes fields such as prompt, category, and extra_info, where extra_info contains information like ground_truth and scoring_function. The usage and evaluation methodologies of the dataset are elaborated in detail, covering how to load the dataset, filter data, and the metrics for assessing translation quality. Additionally, the dataset also provides grammar textbooks and bilingual glossaries to support the learning of Kalamang linguistic rules and word-level translation.
数据集概述
基本信息
- 数据集名称: MTOB for Code-LLaVA
- 托管地址: https://huggingface.co/datasets/tonychenxyz/mtob
- 许可证: mit
- 主要任务类别: 翻译
- 涉及语言: 英语 (en)、Kalamang
- 标签: 翻译、低资源语言、kalamang、基准测试
- 数据规模: n<1K
数据来源与背景
- 核心论文: MTOB: A Benchmark for Learning to Translate from Textbooks
- 基础内容: 基于Kalamang语法和词汇
数据集结构
数据集提供两种配置:
- 配置名称:
memwrap- 描述: 语法教科书内容被包裹在
<|memory_start|>/<|memory_end|>标记中。 - 数据文件:
memwrap/test-* - 注意: 仅语法教科书在记忆块内,词汇表和指令在外部。
- 描述: 语法教科书内容被包裹在
- 配置名称:
plain- 描述: 相同内容,但不包含记忆标记(作为基线)。
- 数据文件:
plain/test-*
两种配置均仅包含test分割。
数据字段说明
通用字段(两种配置共有)
prompt: 聊天模板化的提示字符串。category: 格式为{variant}/mtob/{direction},其中direction是ek(英语→Kalamang)或ke(Kalamang→英语)。extra_info: 一个结构体,包含:ground_truth: 包含target(目标文本)、source(源文本)、direction(翻译方向)、url、original_id。scoring_function: 评分函数,值为mtob_translation。variant: 变体信息。
配置详情
memwrap 配置
- 特征:
prompt: stringcategory: stringextra_info: struct
- 分割信息:
- 分割名称: test
- 样本数量: 100
- 数据集大小: 75694063 字节
- 下载大小: 40918120 字节
plain 配置
- 特征:
prompt: stringcategory: stringextra_info: struct
- 分割信息:
- 分割名称: test
- 样本数量: 100
- 数据集大小: 75690463 字节
- 下载大小: 40926263 字节
使用方式
python from datasets import load_dataset
加载 memwrap 变体
ds = load_dataset("tonychenxyz/mtob", "memwrap", split="test")
按方向过滤数据
eng_to_kal = ds.filter(lambda x: "ek" in x["category"]) kal_to_eng = ds.filter(lambda x: "ke" in x["category"])
评估方法
评分函数 (mtob_translation) 计算以下指标:
exact_match: 精确字符串匹配(不区分大小写,经过标准化)。chrf: 字符n-gram F分数。
数据统计
- 每个翻译方向(E→K 和 K→E)的翻译对。
- 语法教科书提供了Kalamang的语言规则。
- 双语词汇表用于单词级翻译。




