tyouisen commited on
Commit
733820b
1 Parent(s): 0472c06
Files changed (3) hide show
  1. README.md +95 -0
  2. aclue.py +96 -0
  3. aclue_v1_0_0.zip +0 -0
README.md CHANGED
@@ -1,3 +1,98 @@
1
  ---
2
  license: cc-by-nc-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-nc-4.0
3
+ task_categories:
4
+ - multiple-choice
5
+ - question-answering
6
+ language:
7
+ - zh
8
+ tags:
9
+ - llm
10
+ - Ancient Chinese
11
+ - Evaluation
12
+ - chinese
13
+ pretty_name: ACLUE
14
+ size_categories:
15
+ - 1M<n<10M
16
  ---
17
+ # Dataset Card for ACLUE
18
+
19
+ - **Homepage:** [https://github.com/isen-zhang/ACLUE](https://github.com/isen-zhang/ACLUE)
20
+ - **Repository:** [https://huggingface.co/datasets/tyouisen/aclue](https://huggingface.co/datasets/tyouisen/aclue)
21
+ - **Paper:** []()
22
+ - **Leaderboard:** [https://github.com/isen-zhang/ACLUE](https://github.com/isen-zhang/ACLUE)
23
+
24
+ ### 简介 (Introduction)
25
+
26
+ Ancient Chinese Language Understanding Evaluation (ACLUE) 是一个面向古代汉语的评估基准,旨在帮助评估大型语言模型在古代汉语上的表现。
27
+
28
+ The Ancient Chinese Language Understanding Evaluation (ACLUE) is an evaluation benchmark focused on ancient Chinese language comprehension. It aims to assess the performance of large-scale language models (LLMs) on understanding ancient Chinese.
29
+
30
+ ### 数据 (Data)
31
+ 该基准测试包含15个任务,涵盖了各个领域,包括词汇、句法、语义、推理和知识。我们为这15个任务提供了开发集和测试集数据,开发集中有5个问题,而测试集中则有100多个问题。我们鼓励研究人员使用ACLUE来测试和提升其模型在古代汉语语言理解方面的能力。ACLUE的任务来源于精心策划的公开资源和自动生成的古典汉语语料库的结合。这些问题涵盖了从夏朝(公元前2070年)到明朝(公元1368年)的广泛时间范围。ACLUE对所有任务都采用了多项选择题的形式。
32
+
33
+ The benchmark comprises 15 tasks spanning various domains, including lexical, syntactic, semantic, inference, and knowledge. We provide development and test dataset for each of 15 tasks, with 5 questions in development set and 100+ quesitons in test set. We encourage researchers to use ACLUE to test and enhance their models' abilities in ancient Chinese language understanding. ACLUE's tasks are derived from a combination of meticulously curated publicly available resources and automatically generated classical Chinese language corpora. The questions cover a wide temporal range from the Xia dynasty (2070 BCE) to the Ming dynasty (1368 CE). ACLUE employs a multiple-choice question format for all tasks.
34
+
35
+
36
+ ### 数据实例( Data Instances)
37
+ 数据集中的每个问题都是一个包含4个选项的多项选择题,其中只有一个选项是正确答案。以下是两个示例:
38
+
39
+ Each question in the dataset is a multiple-choice questions with 4 choices and only one choice as the correct answer. Here are two examples:
40
+
41
+ ```
42
+ 以下是关于{古诗词曲鉴赏}的单项选择题,请直接给出正确答案的选项。
43
+ 题目:《木兰诗--北朝民歌》唧唧复唧唧,木兰当户织。不闻机杼声,唯闻女叹息。问女何所思,问女何所忆。女亦无所思,女亦无所忆。昨夜见军帖,可汗大点兵,军书十二卷,卷卷有爷名。阿爷无大儿,木兰无长兄,愿为市鞍马,从此替爷征。东市买骏马,西市买鞍鞯,南市买辔头,北市买长鞭。旦辞爷娘去,暮宿黄河边,不闻爷娘唤女声,但闻黄河流水鸣溅溅。旦辞黄河去,暮至黑山头,不闻爷娘唤女声,但闻燕山胡骑鸣啾啾。万里赴戎机,关山度若飞。朔气传金柝,寒光照铁衣。将军百战死,壮士十年归。归来见天子,天子坐明堂。策勋十二转,赏赐百千强。可汗问所欲,木兰不用尚书郎,愿驰千里足,送儿还故乡。爷娘闻女来,出郭相扶将;阿姊闻妹来,当户理红妆;小弟闻姊来,磨刀霍霍向猪羊。开我东阁门,坐我西阁床。脱我战时袍,著我旧时裳。当窗理云鬓,对镜帖花黄。出门看火伴,火伴皆惊忙:同行十二年,不知木兰是女郎。雄兔脚扑朔,雌兔眼迷离;双兔傍地走,安能辨我是雄雌?下列对这首诗的理解和分析,不正确的一项是 ()
44
+ A. 《木兰诗》是南北朝时期的一首长篇叙事民歌,风格刚健质朴。全诗以“木兰是女郎”来构思木兰的传奇故事,富有浪漫色彩。
45
+ B. “愿为市鞍马”的“市”是“市场”的意思,“万里赴戎机”的“戎机”是“战事”的意思。
46
+ C. 木兰“不用尚书郎”而愿“还故乡”固然有对家乡的眷恋,但也有自己女儿身秘密的因素。
47
+ D. “朔气传金柝,寒光照铁衣”运用对偶手法,描写了木兰在边塞艰苦的军旅生活。
48
+ 答案是:B
49
+ ```
50
+ ```
51
+ 题目:《虞美人》李煜。春花秋月何时了?往事知多少。小楼昨夜又东风,故国不堪回首月明中。雕栏玉砌应犹在,只是朱颜改。问君能有几多愁?恰似一江春水向东流。对《虞美人》的赏析,不恰当的一项是()
52
+ A. 词作从眼前景物入手,生发联想和想像,追怀昔日帝王生活,描摹了一幅幅鲜活的画面,隐晦地表达出叛逆之情,惹恼了宋太宗,铸成了词人悲惨结局。
53
+ B. 词作以实虚相间的手法来绘景、抒情、达意,忽而写眼前,忽而写想像。
54
+ C. 《虞美人》乃李煜绝笔词
55
+ D. 《虞美人》以其形式别致给人美感愉悦。
56
+ 答案是:
57
+ ```
58
+ 以下提供了任务的类别、实例数量、问题平均长度以及任务的来源:
59
+
60
+ The category, number of instances, average length of the question, and origin of the tasks are provided below:
61
+
62
+ | Task | Total Q. | Avg. len |Task (zh) | Category | Origin |
63
+ |-------------------------------|------|------|-----------------------------------|----------|-----------|
64
+ | Named entity recognition | 500 | 138 | 古汉语命名体识别 | lexical | generated |
65
+ | Polysemy resolution | 500 | 116 | 古文单字多义 | lexical | generated |
66
+ | Homographic character resolution | 500 | 137 | 通假字 | lexical | generated |
67
+ | Sentence segmentation | 500 | 210 | 古文断句 | syntactic| generated |
68
+ | Couplet prediction | 500 | 62 | 对联预测 | semantic | generated |
69
+ | Poetry context prediction | 500 | 77 | 古诗词上下句预测 | semantic | generated |
70
+ | Poetry sentiment analysis | 500 | 60 | 诗词情感分类 | inference| generated |
71
+ | Poem quality estimation | 406 | 118 | 古诗词质量评估 | inference| generated |
72
+ | Ancient Chinese medical | 211 | 38 | 医古文 | knowledge| collected |
73
+ | Ancient Chinese literature | 160 | 44 | 古代文学知识 | knowledge| collected |
74
+ | Traditional Chinese culture | 136 | 59 | 国学常识 | knowledge| collected |
75
+ | Poetry appreciation | 103 | 258 | 古诗词曲鉴赏 | inference| collected |
76
+ | Basic ancient Chinese | 249 | 52 | 基础古汉语知识 | knowledge| collected |
77
+ | Reading comprehension | 101 | 982 | 古文阅读理解 | inference| collected |
78
+ | Ancient Chinese phonetics | 101 | 50 | 古音学 | knowledge| collected |
79
+
80
+ #### 加载数据 (Load data)
81
+
82
+ ```
83
+ from datasets import load_dataset
84
+
85
+ dataset = load_dataset("tyouisen/aclue")
86
+ ```
87
+
88
+
89
+ ### 引用 (Citation)
90
+ ```
91
+ ```
92
+
93
+ ### 许可证 (License)
94
+ ACLUE数据集采用:
95
+
96
+ The ACLUE dataset is licensed under a:
97
+ [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).
98
+
aclue.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import os
16
+ import datasets
17
+ import pandas as pd
18
+
19
+ _CITATION = """\
20
+ """
21
+
22
+ _DESCRIPTION = """\
23
+ The Ancient Chinese Language Understanding Evaluation (ACLUE) is an evaluation benchmark focused on ancient Chinese language comprehension. It aims to assess the performance of large-scale language models on understanding ancient Chinese.
24
+ """
25
+ _HOMEPAGE = "https://github.com/isen-zhang/ACLUE"
26
+
27
+ _URL = r"https://huggingface.co/datasets/tyouisen/aclue/resolve/main/aclue_v1_0_0.zip"
28
+
29
+ task_list = ['古文单字多义',
30
+ '诗词情感分类',
31
+ '古汉语命名体识别',
32
+ '古汉语知识',
33
+ '古诗词上下句预测',
34
+ '古文断句',
35
+ '对联',
36
+ '古诗词曲鉴赏',
37
+ '国学常识',
38
+ '古音学',
39
+ '通假字',
40
+ '古代文学知识',
41
+ 'ancient_medical',
42
+ '古诗词质量评估',
43
+ '古文阅读理解']
44
+
45
+ class ACLUEConfig(datasets.BuilderConfig):
46
+ def __init__(self, **kwargs):
47
+ super().__init__(version=datasets.Version("1.0.0"), **kwargs)
48
+ # V1.0.0 Init version
49
+
50
+
51
+
52
+ class ACLUE(datasets.GeneratorBasedBuilder):
53
+ BUILDER_CONFIGS = [
54
+ ACLUEConfig(name=task_name) for task_name in task_list
55
+ ]
56
+
57
+ def _info(self):
58
+ features = datasets.Features(
59
+ {
60
+ "Question": datasets.Value("string"),
61
+ "A": datasets.Value("string"),
62
+ "B": datasets.Value("string"),
63
+ "C": datasets.Value("string"),
64
+ "D": datasets.Value("string"),
65
+ "Answer": datasets.Value("string"),
66
+ }
67
+ )
68
+ return datasets.DatasetInfo(
69
+ description=_DESCRIPTION,
70
+ features=features,
71
+ homepage=_HOMEPAGE,
72
+ citation=_CITATION,
73
+ )
74
+
75
+ def _split_generators(self, dl_manager):
76
+ data_dir = dl_manager.download_and_extract(_URL)
77
+ task_name = self.config.name
78
+ return [
79
+ datasets.SplitGenerator(
80
+ name=datasets.Split.TEST,
81
+ gen_kwargs={
82
+ "filepath": os.path.join(data_dir, f"test/{task_name}.csv"),
83
+ },
84
+ ),
85
+ datasets.SplitGenerator(
86
+ name=datasets.Split("dev"),
87
+ gen_kwargs={
88
+ "filepath": os.path.join(data_dir, f"dev/{task_name}.csv"),
89
+ },
90
+ ),
91
+ ]
92
+
93
+ def _generate_examples(self, filepath):
94
+ df = pd.read_csv(filepath, header=0, encoding="utf-8")
95
+ for i, instance in enumerate(df.to_dict(orient="records")):
96
+ yield i, instance
aclue_v1_0_0.zip ADDED
Binary file (732 kB). View file