diff --git a/promptsource/machine_translate.py b/promptsource/machine_translate.py index 7361a21f4..85fff6bda 100644 --- a/promptsource/machine_translate.py +++ b/promptsource/machine_translate.py @@ -3,96 +3,47 @@ from promptsource.templates import Template, TemplateCollection - -### XNLI - -PROMPTS = [ - "GPT-3 style", - "can we infer", - "justified in saying", - "guaranteed/possible/impossible", - "MNLI crowdsource", -] - -LANGS = [ - "ar", - "es", - "fr", - "hi", - "sw", - "ur", - "vi", - "zh", -] - -SOURCE_DATASET = TARGET_DATASET = "xnli" -SOURCE_LANG = "en" - - -### XCOPA - -PROMPTS = [ - "best_option", - 'C1 or C2? premise, so/because…', - "i_am_hesitating", - "cause_effect", - "plausible_alternatives", -] - -LANGS = [ - "id", - "sw", - "ta", - "vi", - "zh", -] - -SOURCE_DATASET = "super_glue/copa" -SOURCE_LANG = None -TARGET_DATASET = "xcopa" - -### XSTORY_CLOZE - -PROMPTS = [ - "Answer Given options", - 'Choose Story Ending', - "Story Continuation and Options", - "Generate Ending", - "Novel Correct Ending", -] - -LANGS = [ - "ar", - "es", - "eu", - "hi", - "id", - "zh", +DS_TO_ENG_PROMPT = { + "xcopa": "en", + "Muennighoff/xstory_cloze": "en", + "Muennighoff/xwinograd": "en", + 'GEM/wiki_lingua': 'en_en', # Contains correct language names + 'xnli': 'en', + "paws-x": "en", + "mlqa": "mlqa.en.en", + "xquad": "xquad.en", + "khalidalt/tydiqa-primary": "english", + "khalidalt/tydiqa-goldp": "english", + "pasinit/xlwic": "en", + "GEM/xlsum": "english", + "GEM/BiSECT": "en", +} + +### ZH Datasets + +DATASETS = [ + ('xquad', 'xquad.zh'), + # Context & Answer is in ZH + ('mlqa', 'mlqa.zh.ar'), + ('mlqa', 'mlqa.zh.vi'), + ('mlqa', 'mlqa.zh.es'), + ('mlqa', 'mlqa.zh.en'), + ('mlqa', 'mlqa.zh.hi'), + ('paws-x', 'zh'), + ('clue', 'c3'), + ('clue', 'cmrc2018'), + ('clue', 'csl'), + ('clue', 'drcd'), + ('clue', 'tnews'), + ('pasinit/xlwic', "xlwic_en_zh"), + ('GEM/xlsum', "chinese_simplified"), + # ('GEM/xlsum', "chinese_traditional"), + # For WikiLingua there are already ZH prompts (except for xp3long prompts) + ("xquad", ) ] -SOURCE_DATASET = TARGET_DATASET = "Muennighoff/xstory_cloze" -SOURCE_LANG = "en" - -### XWINOGRAD - -PROMPTS = [ - "Replace", - "stand for", - "True or False", - "does underscore refer to", - "underscore refer to", -] - -LANGS = [ - "fr", - "pt", - "zh", -] - -SOURCE_DATASET = TARGET_DATASET = "Muennighoff/xwinograd" -SOURCE_LANG = "en" - +LANG = "zh" # Path to key os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/Users/niklasmuennighoff/Desktop/gcp_translate_key.json" @@ -147,22 +98,28 @@ def normalize_string(zh_string, en_string): template_collection = TemplateCollection() -source_templates = template_collection.get_dataset(SOURCE_DATASET, SOURCE_LANG) -for lang in LANGS: - target_templates = template_collection.get_dataset(TARGET_DATASET, lang) +for (ds_name, subset_name) in DATASETS: + + subset_name_eng = subset_name + if ds_name in DS_TO_ENG_PROMPT: + subset_name_eng = DS_TO_ENG_PROMPT[ds_name] + + source_templates = template_collection.get_dataset(ds_name, subset_name_eng) + #for lang in LANGS: + target_templates = template_collection.get_dataset(ds_name, subset_name) for uid, template in source_templates.templates.items(): - if template.name.strip() not in PROMPTS: + if not("xp3long" in template.name.strip()):# not in PROMPTS: continue - print(f"Translating {template.name.strip()} to {lang}") + print(f"Translating {template.name.strip()} to {LANG}") answer_choices = [] if template.answer_choices is not None: choices = template.answer_choices.split("|||") for c in choices: - answer_choices.append(normalize_string(translate(lang, c.strip()), c.strip())) + answer_choices.append(normalize_string(translate(LANG, c.strip()), c.strip())) or_jinja = template.jinja.strip() - jinja = normalize_string(translate(lang, or_jinja), or_jinja) - template_name = template.name.strip() + f"_{lang}mt" + jinja = normalize_string(translate(LANG, or_jinja), or_jinja) + template_name = template.name.strip() + f"_{LANG}mt" target_template = Template( template_name, jinja=jinja, reference="", answer_choices=" ||| ".join(answer_choices) ) diff --git a/promptsource/templates.py b/promptsource/templates.py index c26899659..8930686d8 100644 --- a/promptsource/templates.py +++ b/promptsource/templates.py @@ -841,6 +841,7 @@ def read_from_file(self) -> Dict: "Please ignore this warning if you are creating new prompts for this dataset." ) return {} + print(self.dataset_name, self.yaml_path) yaml_dict = yaml.load(open(self.yaml_path, "r"), Loader=yaml.FullLoader) return yaml_dict[self.TEMPLATES_KEY] diff --git a/promptsource/templates/GEM/wiki_lingua/zh/templates.yaml b/promptsource/templates/GEM/wiki_lingua/zh/templates.yaml index a95eade2b..f8ab32b96 100644 --- a/promptsource/templates/GEM/wiki_lingua/zh/templates.yaml +++ b/promptsource/templates/GEM/wiki_lingua/zh/templates.yaml @@ -71,3 +71,30 @@ templates: original_task: true name: summarize_above_zh reference: xsum templates + dfa7b514-7385-4855-bb90-253073a34fde: !Template + answer_choices: null + id: dfa7b514-7385-4855-bb90-253073a34fde + jinja: "{{target}}\n\n鉴于上述总结,为它写一个详细的文本。||| {{source}}" + metadata: !TemplateMetadata + choices_in_prompt: false + languages: [] + metrics: + - ROUGE + - BLEU + original_task: true + name: xp3longwritearticle_zhmt + reference: '' + dff8b414-7485-4855-bb90-253073a34fde: !Template + answer_choices: null + id: dff8b414-7485-4855-bb90-253073a34fde + jinja: "{{target}}\n\n我对此很感兴趣,但我只有几分钟的时间。 + 你能不能给我最多前500个字符的详细解释关于那个? ||| {{source[:500]}}" + metadata: !TemplateMetadata + choices_in_prompt: false + languages: [] + metrics: + - ROUGE + - BLEU + original_task: true + name: xp3longchars_zhmt + reference: '' diff --git a/promptsource/templates/GEM/xlsum/chinese_simplified/templates.yaml b/promptsource/templates/GEM/xlsum/chinese_simplified/templates.yaml new file mode 100644 index 000000000..21bfe3d1e --- /dev/null +++ b/promptsource/templates/GEM/xlsum/chinese_simplified/templates.yaml @@ -0,0 +1,115 @@ +dataset: GEM/xlsum +subset: chinese_simplified +templates: + 0bf9d87c-c6ac-4ff3-a956-e57ec434c4df: !Template + answer_choices: '' + id: 0bf9d87c-c6ac-4ff3-a956-e57ec434c4df + jinja: 标题:{{title}}\n给定上面虚构文章的标题,想象这篇文章。\n ||| {{text[:7000]}} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: imaginearticle_zhmt + reference: '' + 70151209-fdd4-4b78-988d-629ff5da1239: !Template + answer_choices: '' + id: 70151209-fdd4-4b78-988d-629ff5da1239 + jinja: '{{text[:1000]}}... 继续这篇文章,最多 4000 个字符:||| {{text[1000:5000]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' + 900008a7-0cde-4f0d-8fd3-2ff9cb5b36f1: !Template + answer_choices: '' + id: 900008a7-0cde-4f0d-8fd3-2ff9cb5b36f1 + jinja: 给定以下文章的标题和摘要,生成一篇短篇文章或一篇长篇文章的开头以配合它们。标题:{{title}}\n摘要:{{target}}\n文章(最多 + 500 个字符):||| {{text[:500]}} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longgenarticle_zhmt + reference: '' + 9387daa0-a014-4df0-9d21-ff086dc5df4a: !Template + answer_choices: '' + id: 9387daa0-a014-4df0-9d21-ff086dc5df4a + jinja: 要总结的文档:{{text[:8500]}}\n以与文档相同的语言进行总结:||| {{target}} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: docsummary_zhmt + reference: '' + 97e1cdb0-1c5d-4421-a15b-faf02cd812a8: !Template + answer_choices: '' + id: 97e1cdb0-1c5d-4421-a15b-faf02cd812a8 + jinja: '{{text}} \n\n给我上面文章的好标题。 ||| {{title}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: goodtitle_zhmt + reference: '' + 9d46d594-7463-4f74-bfd9-b5cbf804e94b: !Template + answer_choices: '' + id: 9d46d594-7463-4f74-bfd9-b5cbf804e94b + jinja: 标题:{{title}}\n给定上面虚构文章的标题,想象这篇文章。\n ||| {{text[:7000]}} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longimaginearticle_zhmt + reference: '' + bfd429f5-d75d-46a2-8224-874d1109c310: !Template + answer_choices: '' + id: bfd429f5-d75d-46a2-8224-874d1109c310 + jinja: '{{title}}\n{{text[:5000]}}\n\ntl;博士:||| {{target}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: tldr_zhmt + reference: '' + d4f2980a-cb44-4e47-b6c3-3df858c82126: !Template + answer_choices: '' + id: d4f2980a-cb44-4e47-b6c3-3df858c82126 + jinja: 给定以下文章的标题和摘要,生成一篇短篇文章或一篇长篇文章的开头以配合它们。标题:{{title}}\n摘要:{{target}}\n文章(最多 + 500 个字符):||| {{text[:500]}} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: genarticle_zhmt + reference: '' + dca03c69-940f-46b0-acd8-16bbcbd6bec9: !Template + answer_choices: '' + id: dca03c69-940f-46b0-acd8-16bbcbd6bec9 + jinja: '...{{text[3000:3500]}}... 写下文章的其余部分:||| {{text[5000:]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longrest_zhmt + reference: '' + ff7e01a6-9c23-4228-85c8-b84432deeb50: !Template + answer_choices: '' + id: ff7e01a6-9c23-4228-85c8-b84432deeb50 + jinja: 内容:{{text[:7000]}}\n前面的内容可以总结如下:||| {{target}} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: prevcontent_zhmt + reference: '' diff --git a/promptsource/templates/Muennighoff/xstory_cloze/zh/templates.yaml b/promptsource/templates/Muennighoff/xstory_cloze/zh/templates.yaml index 868b2e3e1..831fd8d95 100644 --- a/promptsource/templates/Muennighoff/xstory_cloze/zh/templates.yaml +++ b/promptsource/templates/Muennighoff/xstory_cloze/zh/templates.yaml @@ -99,3 +99,80 @@ templates: original_task: null name: Answer Given options_zhmt reference: '' + 2a5546f9-a0e2-4fbb-aee8-b26ead2cf6b8: !Template + answer_choices: '{{sentence_quiz1}} ||| {{sentence_quiz2}}' + id: 2a5546f9-a0e2-4fbb-aee8-b26ead2cf6b8 + jinja: '{{input_sentence_1}} {{input_sentence_2}} {{input_sentence_3}} {{input_sentence_4}} + 下面那个选项能够延续故事的发展? + - {{answer_choices | join("\n- ")}} ||| {{answer_choices[answer_right_ending + -1]}}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: Answer Given options_zhht + reference: '' + 2a9d66bc-eb77-4e7c-af6e-3d15b79d6cf1: !Template + answer_choices: '{{sentence_quiz1}} ||| {{sentence_quiz2}}' + id: 2a9d66bc-eb77-4e7c-af6e-3d15b79d6cf1 + jinja: "请读这则故事:\n\n{{input_sentence_1}}\n{{input_sentence_2}}\n\ + {{input_sentence_3}}\n{{input_sentence_4}}\n\n现在请选择贴切的结局: \n- {{answer_choices | join(\"\\\ + n- \")}}\n|||\n\n{{answer_choices[answer_right_ending -1]}}" + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: Choose Story Ending_zhht + reference: '' + c5c8225f-2d3a-4691-bdd5-58956816702f: !Template + answer_choices: '{{sentence_quiz1}} ||| {{sentence_quiz2}}' + id: c5c8225f-2d3a-4691-bdd5-58956816702f + jinja: "哪个选项能够继续以下的故事? \n\n{{input_sentence_1}}\n\ + {{input_sentence_2}}\n{{input_sentence_3}}\n{{input_sentence_4}}\n\n选项如下:\n- {{answer_choices | join(\"\\n- \")}}\n|||\n\n{{answer_choices[answer_right_ending\ + \ -1]}}" + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: Story Continuation and Options_zhht + reference: '' + cacca716-43cf-4954-a35c-655d775321e6: !Template + answer_choices: '{{sentence_quiz1}} ||| {{sentence_quiz2}}' + id: cacca716-43cf-4954-a35c-655d775321e6 + jinja: '请为这则故事写出可能的结局: {{input_sentence_1}} + {{input_sentence_2}} {{input_sentence_3}} {{input_sentence_4}} ||| {{answer_choices[answer_right_ending + -1]}}' + metadata: !TemplateMetadata + choices_in_prompt: false + languages: + - zh + metrics: + - BLEU + - ROUGE + original_task: false + name: Generate Ending_zhht + reference: '' + d6f3d112-4f97-449f-a911-03470d418f7d: !Template + answer_choices: '{{sentence_quiz1}} ||| {{sentence_quiz2}}' + id: d6f3d112-4f97-449f-a911-03470d418f7d + jinja: '我读了这则长篇故事:{{input_sentence_1}} {{input_sentence_2}} + {{input_sentence_3}} {{input_sentence_4}} 你觉得哪个是合适的结局?请从这些选项中作出选择:- {{answer_choices | join("\n- + ")}} ||| {{answer_choices[answer_right_ending -1]}}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: Novel Correct Ending_zhht + reference: '' diff --git a/promptsource/templates/Muennighoff/xwinograd/zh/templates.yaml b/promptsource/templates/Muennighoff/xwinograd/zh/templates.yaml index 53168d78c..5480c93ec 100644 --- a/promptsource/templates/Muennighoff/xwinograd/zh/templates.yaml +++ b/promptsource/templates/Muennighoff/xwinograd/zh/templates.yaml @@ -78,3 +78,77 @@ templates: original_task: null name: does underscore refer to_zhmt reference: '' + 33d31908-4aee-4545-aff2-7528cbf39197: !Template + answer_choices: '{{option1}} ||| {{option2}}' + id: 33d31908-4aee-4545-aff2-7528cbf39197 + jinja: "{{sentence}}\n把上个句子中的_替换成正确的选项:\ + \ \n- {{option1}}\n- {{option2}}\n|||\n{% if answer == '1' %} {{option1}} {%\ + \ else %} {{ option2 }} {% endif %}" + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: Replace_zhht + reference: '' + 7f5f6d33-25e2-4394-b1f0-49a2a54767aa: !Template + answer_choices: True ||| False + id: 7f5f6d33-25e2-4394-b1f0-49a2a54767aa + jinja: '在以下的句子中,_ 指的是{{option1}}。 对否? + {{sentence}}||| + {{answer_choices[answer|int - 1]}}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: false + name: True or False_zhht + reference: '' + 22f9679e-7b6c-4ee7-a348-e905ed9aaf9e: !Template + answer_choices: '{{ option1 }} ||| {{ option2 }}' + id: 22f9679e-7b6c-4ee7-a348-e905ed9aaf9e + jinja: '{{ sentence }} 在上个句子里, _ 指的是{{ option1 }}抑或{{ option2 }}? ||| {% if answer == ''1'' %} {{option1}} {% else %} {{ option2 + }} {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: does underscore refer to_zhht + reference: '' + bd11cf1f-bda2-4757-b1b5-f1a20a3f7202: !Template + answer_choices: '{{option1}} ||| {{option2}}' + id: bd11cf1f-bda2-4757-b1b5-f1a20a3f7202 + jinja: '{{sentence}} + _ 在上面的句子中指的是什么?{{ option1 }}还是{{ option2 }}? ||| {% if answer == ''1'' %} {{option1}} {% else %} {{ option2 }} {% endif + %}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: underscore refer to_zhht + reference: '' + ec355d5d-bb5c-488c-93a0-4f90e6011c5d: !Template + answer_choices: '{{option1}} ||| {{option2}}' + id: ec355d5d-bb5c-488c-93a0-4f90e6011c5d + jinja: '在下面的句子里, _ 代表{{answer_choices[0]}}还是{{answer_choices[1]}}? + {{sentence}}||| + {{answer_choices[answer | int - 1]}}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: stand for_zhht + reference: '' diff --git a/promptsource/templates/clue/c3/templates.yaml b/promptsource/templates/clue/c3/templates.yaml index 7856a1a1f..996b226c1 100644 --- a/promptsource/templates/clue/c3/templates.yaml +++ b/promptsource/templates/clue/c3/templates.yaml @@ -1,6 +1,48 @@ dataset: clue subset: c3 templates: + 28fc1d2b-30e5-4c37-9c87-14aa837df15e: !Template + answer_choices: '' + id: 28fc1d2b-30e5-4c37-9c87-14aa837df15e + jinja: '{% for statement in context %} + + {{ statement }} + + {% endfor %} + + 鉴于上面的对话/段落,问题“{{question}}”的答案是什么 + + ||| + + {{ answer }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer-question-interrogative-no-choices_zhmt + reference: '' + 4d6c5a6c-b693-4118-8495-800b97500bf9: !Template + answer_choices: '' + id: 4d6c5a6c-b693-4118-8495-800b97500bf9 + jinja: '段落:{% for statement in context %} + + {{ statement }} + + {% endfor %} + + 什么样的问题会引起 {{ answer }} 的回答响应? + + ||| + + {{ question }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: generate_question_zhmt + reference: '' 51b3c3fe-2fa2-474a-81f9-5b421c884109: !Template answer_choices: '{{ choice | join(" ||| ") }}' id: 51b3c3fe-2fa2-474a-81f9-5b421c884109 @@ -17,6 +59,31 @@ templates: original_task: true name: answer-question-affirmative reference: '' + 51f68e4d-1440-4512-8f16-09c232085029: !Template + answer_choices: '{{ choice | join(" ||| ") }}' + id: 51f68e4d-1440-4512-8f16-09c232085029 + jinja: "{% for statement in context %} + + {{ statement }} + + {% endfor %} + + 鉴于上面的对话/段落,使用以下选项回答问题“{{question}}”。 + + 选项: + + - {{ answer_choices | join('\n- ') }} + + ||| + + {{ answer }}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer-question-affirmative_zhmt + reference: '' 5e06f05f-d7dd-4329-b6d8-3a62dcdba838: !Template answer_choices: '{{ choice | join(" ||| ") }}' id: 5e06f05f-d7dd-4329-b6d8-3a62dcdba838 @@ -47,6 +114,29 @@ templates: original_task: false name: generate_question reference: '' + 6fb601d3-16b4-4cc3-b1af-f653cb6df46f: !Template + answer_choices: '{{ choice | join('' ||| '') }}' + id: 6fb601d3-16b4-4cc3-b1af-f653cb6df46f + jinja: "段落:{% for statement in context %} + + {{ statement }} + + {% endfor %} + + 问题:“{{question}}” + + 答案选择:{{ answer_choices[:-1] | join(', ') }} 还是 {{ answer_choices[-1] }}? + + ||| + + {{ answer }}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: question_choices_context_zhmt + reference: '' a5820d05-a8df-4e31-a284-6969e478174b: !Template answer_choices: '{{ choice | join('' ||| '') }}' id: a5820d05-a8df-4e31-a284-6969e478174b @@ -63,6 +153,29 @@ templates: original_task: true name: answer-question-interrogative reference: '' + c0dc3493-f8ef-4c3b-9b30-8dcca5626fd6: !Template + answer_choices: '{{ choice | join('' ||| '') }}' + id: c0dc3493-f8ef-4c3b-9b30-8dcca5626fd6 + jinja: "{% for statement in context %} + + {{ statement }} + + {% endfor %} + + 鉴于上面的对话/段落,问题“{{question}}”的答案是什么 + + 答案选择:{{ answer_choices[:-1] | join(', ') }} 还是 {{ answer_choices[-1] }}? + + ||| + + {{ answer }}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer-question-interrogative_zhmt + reference: '' f15acc3f-e067-488f-b426-f65aa604da55: !Template answer_choices: null id: f15acc3f-e067-488f-b426-f65aa604da55 diff --git a/promptsource/templates/clue/cmrc2018/templates.yaml b/promptsource/templates/clue/cmrc2018/templates.yaml index fb5c0dd1c..dc04ad568 100644 --- a/promptsource/templates/clue/cmrc2018/templates.yaml +++ b/promptsource/templates/clue/cmrc2018/templates.yaml @@ -1,6 +1,17 @@ dataset: clue subset: cmrc2018 templates: + 378f10bc-8e4f-492f-b581-625f221f1cdb: !Template + answer_choices: '' + id: 378f10bc-8e4f-492f-b581-625f221f1cdb + jinja: 问:{{ question }}你能写一些上下文来回答这个问题吗? ||| {{ context }} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longctxt_zhmt + reference: '' 3bba02e6-9266-418b-9ba0-4f71755cf3b6: !Template answer_choices: null id: 3bba02e6-9266-418b-9ba0-4f71755cf3b6 @@ -19,6 +30,23 @@ templates: original_task: false name: generate_question reference: '' + 552242d1-9ca7-4487-848c-1891f4e0c955: !Template + answer_choices: '' + id: 552242d1-9ca7-4487-848c-1891f4e0c955 + jinja: '{{ context }} + + {{ question }} 的答案在上面的段落中。它是什么? + + ||| + + {{ answers[''text''][0] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer_in_the_passage_zhmt + reference: '' 8fe02215-7881-4a61-a6e7-579680e40b9b: !Template answer_choices: null id: 8fe02215-7881-4a61-a6e7-579680e40b9b @@ -77,8 +105,8 @@ templates: 9fc15385-814e-419a-b862-2d4e06a58ef6: !Template answer_choices: null id: 9fc15385-814e-419a-b862-2d4e06a58ef6 - jinja: 'Q: {{ question }} - Can you write some context to answer the question? ||| {{ context }}' + jinja: 'Q: {{ question }} Can you write some context to answer the question? ||| + {{ context }}' metadata: !TemplateMetadata choices_in_prompt: false languages: @@ -91,9 +119,9 @@ templates: 9fc25385-814e-419a-b862-2d4e06a58ef6: !Template answer_choices: null id: 9fc25385-814e-419a-b862-2d4e06a58ef6 - jinja: '{{ context[:answers["answer_start"][0]-5] }}... How would you - continue the prior text to answer "{{ question }}"? - ||| {{ context[answers["answer_start"][0]-5:] }}' + jinja: '{{ context[:answers["answer_start"][0]-5] }}... How would you continue + the prior text to answer "{{ question }}"? ||| {{ context[answers["answer_start"][0]-5:] + }}' metadata: !TemplateMetadata choices_in_prompt: false languages: @@ -103,3 +131,68 @@ templates: original_task: true name: xp3longcontinue reference: '' + da67ca89-a235-49b5-8e1a-db521910917c: !Template + answer_choices: '' + id: da67ca89-a235-49b5-8e1a-db521910917c + jinja: '{{ context[:answers["answer_start"][0]-5] }}... 你将如何继续前面的文本来回答“{{ question + }}”? ||| {{ context[answers["answer_start"][0]-5:] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' + f9f87de0-0f6d-475e-9bf9-40fe1e37569f: !Template + answer_choices: '' + id: f9f87de0-0f6d-475e-9bf9-40fe1e37569f + jinja: '使用给定的上下文回答问题。 + + 问题:{{ question }} + + 上下文:{{ context }} + + 答案:||| + + {{ answers[''text''][0] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer_following_question_zhmt + reference: '' + fe61c617-1fee-4ccd-8082-c42437e62832: !Template + answer_choices: '' + id: fe61c617-1fee-4ccd-8082-c42437e62832 + jinja: '在考试中,你被问到 {{ question }},你的任务是从以下段落中找到答案。 + + {{ context }} + + 答案是什么? + + ||| + + {{ answers[''text''][0] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: in_an_exam_zhmt + reference: '' + ffb82913-abf7-4eec-b565-86497cd10448: !Template + answer_choices: '' + id: ffb82913-abf7-4eec-b565-86497cd10448 + jinja: '给定这个上下文“{{ context }}”,生成一个返回“{{ answers[''text''][0] }}”答案的问题。 + + ||| + + {{ question }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: generate_question_zhmt + reference: '' diff --git a/promptsource/templates/clue/csl/templates.yaml b/promptsource/templates/clue/csl/templates.yaml index 6fe17c67e..1fe7548dd 100644 --- a/promptsource/templates/clue/csl/templates.yaml +++ b/promptsource/templates/clue/csl/templates.yaml @@ -66,6 +66,84 @@ templates: original_task: false name: generate_keywords reference: '' + 4216973d-8f07-477d-a0d9-75fbc03f14be: !Template + answer_choices: 不 ||| 是的 + id: 4216973d-8f07-477d-a0d9-75fbc03f14be + jinja: '一位学者使用“{{ keyword | join('', '') }}”作为搜索词。你认为搜索引擎会返回摘要“{{abst}}”吗?回答 {{ + answer_choices[1] }} 或 {{ answer_choices[0] }}。 + + ||| + + {{ answer_choices[label] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: search_terms_zhmt + reference: '' + 65f16551-9794-44f5-bb16-4d97df0251ef: !Template + answer_choices: '' + id: 65f16551-9794-44f5-bb16-4d97df0251ef + jinja: '给定抽象{{abst}},列出{{ keyword | length }} 关键字。 + + ||| + + {% if label == 1 %} + + {{ keyword | join('', '') }} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: generate_keywords_zhmt + reference: '' + 72cf15e7-e163-40bc-b391-beb2b3b1a3f5: !Template + answer_choices: 不 ||| 是的 + id: 72cf15e7-e163-40bc-b391-beb2b3b1a3f5 + jinja: 写一篇关于“{{ keyword | join(', ') }}”的摘要:||| {% if label == 1 %} {{abst}} {% + endif %} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longabst_zhmt + reference: '' + 89851e70-f78d-4127-bdae-c39f1914d16f: !Template + answer_choices: 不 ||| 是的 + id: 89851e70-f78d-4127-bdae-c39f1914d16f + jinja: '在约翰写完摘要“{{abst}}”之后,他写了这些关键字“{{ keyword | join('', '') }}”。你认为他选择的关键词是正确的吗?回答 + {{ answer_choices[1]}} 或 {{ answer_choices[0]}}。 + + ||| + + {{ answer_choices[label] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: write_keywords_after_abstract_zhmt + reference: '' + a77f23b8-de58-4475-9daf-8992108041b1: !Template + answer_choices: 不 ||| 是的 + id: a77f23b8-de58-4475-9daf-8992108041b1 + jinja: '这些关键字“{{ keyword | join('', '') }}”是否代表抽象“{{ abst }}”中的关键概念? + + ||| + + {{ answer_choices[label] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: do_represent_zhmt + reference: '' aaf47f6f-fd8f-4180-8d85-e4c7df088ac6: !Template answer_choices: no ||| yes id: aaf47f6f-fd8f-4180-8d85-e4c7df088ac6 @@ -91,11 +169,8 @@ templates: aff47f6f-fd8f-4180-8d85-e4c7df088ac6: !Template answer_choices: no ||| yes id: aff47f6f-fd8f-4180-8d85-e4c7df088ac6 - jinja: 'Write an abstract about "{{ keyword | join('', '') }}": - ||| - {% if label == 1 %} - {{abst}} - {% endif %}' + jinja: 'Write an abstract about "{{ keyword | join('', '') }}": ||| {% if label + == 1 %} {{abst}} {% endif %}' metadata: !TemplateMetadata choices_in_prompt: true languages: diff --git a/promptsource/templates/clue/drcd/templates.yaml b/promptsource/templates/clue/drcd/templates.yaml index ed51fb34c..e15835503 100644 --- a/promptsource/templates/clue/drcd/templates.yaml +++ b/promptsource/templates/clue/drcd/templates.yaml @@ -1,6 +1,23 @@ dataset: clue subset: drcd templates: + 0051dfc2-101c-4d2f-b33f-213df9da0672: !Template + answer_choices: '' + id: 0051dfc2-101c-4d2f-b33f-213df9da0672 + jinja: '{{ context }} + + {{ question }} 的答案在上面的段落中。它是什么? + + ||| + + {{ answers[''text''][0] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer_in_the_passage_zhmt + reference: '' 2b2454d1-4375-4fb3-93a5-8c1e4ee605ea: !Template answer_choices: null id: 2b2454d1-4375-4fb3-93a5-8c1e4ee605ea @@ -22,6 +39,29 @@ templates: original_task: true name: answer_following_question reference: '' + 382d0afc-e2cc-4176-8532-1ca201d7ec51: !Template + answer_choices: '' + id: 382d0afc-e2cc-4176-8532-1ca201d7ec51 + jinja: '{{context[:answers["answer_start"]-5]}}... 你将如何继续前面的文本来回答“{{ question}}”? + ||| {{context[answers["answer_start"]-5:]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' + 3c69b5c9-2dc0-463e-8cd2-afd6b6a99a7f: !Template + answer_choices: '' + id: 3c69b5c9-2dc0-463e-8cd2-afd6b6a99a7f + jinja: 在考试中,你被问到 {{ question }},你的任务是找到回答问题的段落。写这样一段话:||| {{ context }} + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longpassage_zhmt + reference: '' 41aebf75-a867-455b-a5dc-519ab83cf24f: !Template answer_choices: null id: 41aebf75-a867-455b-a5dc-519ab83cf24f @@ -41,6 +81,73 @@ templates: original_task: true name: answer_in_the_passage reference: '' + 438b48f0-f548-443f-a737-376cb9e81c39: !Template + answer_choices: '' + id: 438b48f0-f548-443f-a737-376cb9e81c39 + jinja: '在考试中,你被问到 {{ question }},你的任务是从以下段落中找到答案。 + + {{ context }} + + 答案是什么? + + ||| + + {{ answers[''text''][0] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: in_an_exam_zhmt + reference: '' + 529c5e7a-a842-4e93-bd73-3124e0ea2b0e: !Template + answer_choices: '' + id: 529c5e7a-a842-4e93-bd73-3124e0ea2b0e + jinja: '给定这个上下文“{{ context }}”,生成一个返回“{{ answers[''text''][0] }}”答案的问题。 + + ||| + + {{ question }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: generate_question_zhmt + reference: '' + 9fc35386-814e-419a-b862-2d4e06a58ef6: !Template + answer_choices: null + id: 9fc35386-814e-419a-b862-2d4e06a58ef6 + jinja: '{{context[:answers["answer_start"]-5]}}... How would you continue the + prior text to answer "{{ question }}"? ||| {{context[answers["answer_start"]-5:]}}' + metadata: !TemplateMetadata + choices_in_prompt: false + languages: + - zh + metrics: + - Squad + original_task: true + name: xp3longcontinue + reference: '' + 9fff93be-31ff-4517-918b-61ac87adc52b: !Template + answer_choices: '' + id: 9fff93be-31ff-4517-918b-61ac87adc52b + jinja: '使用给定的上下文回答问题。 + + 问题:{{ question }} + + 上下文:{{ context }} + + 答案:||| + + {{ answers[''text''][0] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer_following_question_zhmt + reference: '' ac20087c-80a0-4965-8cab-d8cb6f90a555: !Template answer_choices: null id: ac20087c-80a0-4965-8cab-d8cb6f90a555 @@ -74,27 +181,11 @@ templates: original_task: true name: in_an_exam reference: '' - 9fc35386-814e-419a-b862-2d4e06a58ef6: !Template - answer_choices: null - id: 9fc35386-814e-419a-b862-2d4e06a58ef6 - jinja: '{{context[:answers["answer_start"]-5]}}... How would you - continue the prior text to answer "{{ question }}"? - ||| {{context[answers["answer_start"]-5:]}}' - metadata: !TemplateMetadata - choices_in_prompt: false - languages: - - zh - metrics: - - Squad - original_task: true - name: xp3longcontinue - reference: '' b4684f23-b191-4e6d-9dc5-12b1d7d4cf49: !Template answer_choices: null id: b4684f23-b191-4e6d-9dc5-12b1d7d4cf49 - jinja: "In an exam, you are asked {{ question }}, and you are tasked to find a passage - answering the question. Write such a passage: ||| - {{ context }}" + jinja: 'In an exam, you are asked {{ question }}, and you are tasked to find a + passage answering the question. Write such a passage: ||| {{ context }}' metadata: !TemplateMetadata choices_in_prompt: false languages: diff --git a/promptsource/templates/clue/tnews/templates.yaml b/promptsource/templates/clue/tnews/templates.yaml index 685170cc5..d9ff1457e 100644 --- a/promptsource/templates/clue/tnews/templates.yaml +++ b/promptsource/templates/clue/tnews/templates.yaml @@ -1,6 +1,24 @@ dataset: clue subset: tnews templates: + 0c87f0d8-f102-4084-b75b-d37222d073bb: !Template + answer_choices: 故事 ||| 文化 ||| 娱乐 ||| 运动的 ||| 金融 ||| 房地产 ||| 车 ||| 教育 ||| 技术 ||| + 军队 ||| 旅行 ||| 世界新闻 ||| 股票 ||| 农业 ||| 游戏 + id: 0c87f0d8-f102-4084-b75b-d37222d073bb + jinja: '将标题“{{ sentence }}”分为以下主题: + + - {{ answer_choices | join(''\n- '') }} + + 主题:||| + + {{ answer_choices[label] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: classify_title_zhmt + reference: '' 0c965fcd-d5e9-4e6a-b8ec-13253ed7bf4a: !Template answer_choices: story ||| culture ||| entertainment ||| sports ||| finance ||| real estate ||| car ||| education ||| tech ||| military ||| travel ||| world @@ -39,6 +57,42 @@ templates: original_task: true name: best_represent reference: '' + af75d29d-4dae-43f9-9f24-1919aafd1161: !Template + answer_choices: 故事 ||| 文化 ||| 娱乐 ||| 运动的 ||| 金融 ||| 房地产 ||| 车 ||| 教育 ||| 技术 ||| + 军队 ||| 旅行 ||| 世界新闻 ||| 股票 ||| 农业 ||| 游戏 + id: af75d29d-4dae-43f9-9f24-1919aafd1161 + jinja: '以下新闻标题“{{ sentence }}”属于什么主题? {{ answer_choices[0] | capitalize }}, {{ + answer_choices[1:-1] | join('', '') }} 还是 {{ answer_choices[-1] }}? + + ||| + + {{ answer_choices[label] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: what_title_zhmt + reference: '' + b87348c1-f990-4714-9326-4ece9b148777: !Template + answer_choices: 故事 ||| 文化 ||| 娱乐 ||| 运动的 ||| 金融 ||| 房地产 ||| 车 ||| 教育 ||| 技术 ||| + 军队 ||| 旅行 ||| 世界新闻 ||| 股票 ||| 农业 ||| 游戏 + id: b87348c1-f990-4714-9326-4ece9b148777 + jinja: '鉴于 {{answer_choices[:-1] | join('', '') }} 和 {{ answer_choices[-1] }},指定它们中的哪一个最能代表以下句子: + + {{ sentence }} + + + 最佳:||| + + {{ answer_choices[label] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: best_represent_zhmt + reference: '' c242254c-bf5d-4efb-9dc3-51717bab7f78: !Template answer_choices: story ||| culture ||| entertainment ||| sports ||| finance ||| real estate ||| car ||| education ||| tech ||| military ||| travel ||| world diff --git a/promptsource/templates/mlqa/mlqa.zh.ar/templates.yaml b/promptsource/templates/mlqa/mlqa.zh.ar/templates.yaml new file mode 100644 index 000000000..2bbbed1cc --- /dev/null +++ b/promptsource/templates/mlqa/mlqa.zh.ar/templates.yaml @@ -0,0 +1,127 @@ +dataset: mlqa +subset: mlqa.zh.ar +templates: + 2c657c09-e3a1-4378-aa7e-b1dd1924f7cc: !Template + answer_choices: '' + id: 2c657c09-e3a1-4378-aa7e-b1dd1924f7cc + jinja: '参考下面的文章,然后用与文章相同的语言回答问题: + + + 段落:{{context}} + + + 问题:{{question}} + + ||| + + {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: refercqa_zhmt + reference: '' + 39c41a5f-9d6f-4e11-ae83-beb92b63a502: !Template + answer_choices: '' + id: 39c41a5f-9d6f-4e11-ae83-beb92b63a502 + jinja: '我找到了一个用 {{answers.text[0]}} 回答“{{answers.text[0]}}”的文本。它以“{{ context[:10] + }}”开头。可以继续吗? + + ||| {{ context[10:] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longanswers_zhmt + reference: '' + 6b978f9e-7807-423f-8183-c7d6474cb4cf: !Template + answer_choices: '' + id: 6b978f9e-7807-423f-8183-c7d6474cb4cf + jinja: "问题:{{question}}\n 上下文:{{context}}\n 从上下文中回答:||| {{answers.text[0]}}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: qaanswera_zhmt + reference: '' + 7d8f9396-f40e-4f51-b5cf-77d9cf57f5b7: !Template + answer_choices: '' + id: 7d8f9396-f40e-4f51-b5cf-77d9cf57f5b7 + jinja: '{{context}} + + 问:{{question}} + + 参考上面的段落,用该段落的语言对给定问题的正确答案是||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: cqreferringa_zhmt + reference: '' + 99585fd6-d507-4559-98a6-207a2cd6e048: !Template + answer_choices: '' + id: 99585fd6-d507-4559-98a6-207a2cd6e048 + jinja: 'D:{{context}} + + + 问:{{question}} + + + 答:||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: dqa_zhmt + reference: '' + aae8b7c5-2761-4ed9-9a05-ad7aa7fa309f: !Template + answer_choices: '' + id: aae8b7c5-2761-4ed9-9a05-ad7aa7fa309f + jinja: '阅读下面的短文,然后从短文中选出正确的部分来回答下面的问题: + + {{context}} + + {{question}} + + ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: exractingcqa_zhmt + reference: '' + f3b58724-02ec-486c-86ba-43f1ed52a294: !Template + answer_choices: '' + id: f3b58724-02ec-486c-86ba-43f1ed52a294 + jinja: '{{ context[:answers.answer_start[0]-5]}}... 继续上述操作,使其回答“{{question}}”:||| + {{ context[answers.answer_start[0]-5:]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' + fcde6584-ceeb-41c4-8a21-94e3ae88fbb4: !Template + answer_choices: '' + id: fcde6584-ceeb-41c4-8a21-94e3ae88fbb4 + jinja: '{{context}} + + + 参考上述上下文,{{question}} ||| + + + {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: creferenceqa_zhmt + reference: '' diff --git a/promptsource/templates/mlqa/mlqa.zh.en/templates.yaml b/promptsource/templates/mlqa/mlqa.zh.en/templates.yaml new file mode 100644 index 000000000..f8f70844c --- /dev/null +++ b/promptsource/templates/mlqa/mlqa.zh.en/templates.yaml @@ -0,0 +1,127 @@ +dataset: mlqa +subset: mlqa.zh.en +templates: + 162a8f4e-8803-4f20-8cd6-8b4a26db7100: !Template + answer_choices: '' + id: 162a8f4e-8803-4f20-8cd6-8b4a26db7100 + jinja: '{{ context[:answers.answer_start[0]-5]}}... 继续上述操作,使其回答“{{question}}”:||| + {{ context[answers.answer_start[0]-5:]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' + 5b6d880d-bfa1-4aad-a752-b718550f2b59: !Template + answer_choices: '' + id: 5b6d880d-bfa1-4aad-a752-b718550f2b59 + jinja: '参考下面的文章,然后用与文章相同的语言回答问题: + + + 段落:{{context}} + + + 问题:{{question}} + + ||| + + {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: refercqa_zhmt + reference: '' + 60bebfe7-c5e0-4baf-b13d-7336d817e2f3: !Template + answer_choices: '' + id: 60bebfe7-c5e0-4baf-b13d-7336d817e2f3 + jinja: '阅读下面的短文,然后从短文中选出正确的部分来回答下面的问题: + + {{context}} + + {{question}} + + ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: exractingcqa_zhmt + reference: '' + 73643780-0b67-4dc7-bfa8-307e49f6e8b7: !Template + answer_choices: '' + id: 73643780-0b67-4dc7-bfa8-307e49f6e8b7 + jinja: 'D:{{context}} + + + 问:{{question}} + + + 答:||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: dqa_zhmt + reference: '' + a5ae3d3f-7b1b-4d75-9eb9-0a1aca64451a: !Template + answer_choices: '' + id: a5ae3d3f-7b1b-4d75-9eb9-0a1aca64451a + jinja: '{{context}} + + 问:{{question}} + + 参考上面的段落,用该段落的语言对给定问题的正确答案是||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: cqreferringa_zhmt + reference: '' + bea86653-af31-4f52-a8a6-845b4a6d6968: !Template + answer_choices: '' + id: bea86653-af31-4f52-a8a6-845b4a6d6968 + jinja: '我找到了一个用 {{answers.text[0]}} 回答“{{answers.text[0]}}”的文本。它以“{{ context[:10] + }}”开头。可以继续吗? + + ||| {{ context[10:] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longanswers_zhmt + reference: '' + c0d720bd-9026-49f2-89ec-19d3548ef515: !Template + answer_choices: '' + id: c0d720bd-9026-49f2-89ec-19d3548ef515 + jinja: "问题:{{question}}\n 上下文:{{context}}\n 从上下文中回答:||| {{answers.text[0]}}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: qaanswera_zhmt + reference: '' + e0cd5099-d9ec-490c-95d4-e169445b62cc: !Template + answer_choices: '' + id: e0cd5099-d9ec-490c-95d4-e169445b62cc + jinja: '{{context}} + + + 参考上述上下文,{{question}} ||| + + + {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: creferenceqa_zhmt + reference: '' diff --git a/promptsource/templates/mlqa/mlqa.zh.es/templates.yaml b/promptsource/templates/mlqa/mlqa.zh.es/templates.yaml new file mode 100644 index 000000000..9ccda744f --- /dev/null +++ b/promptsource/templates/mlqa/mlqa.zh.es/templates.yaml @@ -0,0 +1,127 @@ +dataset: mlqa +subset: mlqa.zh.es +templates: + 1069a0e3-96fd-4f27-92da-56a8ee2046a5: !Template + answer_choices: '' + id: 1069a0e3-96fd-4f27-92da-56a8ee2046a5 + jinja: '我找到了一个用 {{answers.text[0]}} 回答“{{answers.text[0]}}”的文本。它以“{{ context[:10] + }}”开头。可以继续吗? + + ||| {{ context[10:] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longanswers_zhmt + reference: '' + 1c34308f-4ba6-4b11-84db-d11c3be79c1f: !Template + answer_choices: '' + id: 1c34308f-4ba6-4b11-84db-d11c3be79c1f + jinja: 'D:{{context}} + + + 问:{{question}} + + + 答:||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: dqa_zhmt + reference: '' + 1f7f989d-5d4d-448d-93a0-c7a8d2380d8c: !Template + answer_choices: '' + id: 1f7f989d-5d4d-448d-93a0-c7a8d2380d8c + jinja: '阅读下面的短文,然后从短文中选出正确的部分来回答下面的问题: + + {{context}} + + {{question}} + + ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: exractingcqa_zhmt + reference: '' + 6080bbd7-e072-4483-8119-cc39ae0619d3: !Template + answer_choices: '' + id: 6080bbd7-e072-4483-8119-cc39ae0619d3 + jinja: '{{context}} + + 问:{{question}} + + 参考上面的段落,用该段落的语言对给定问题的正确答案是||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: cqreferringa_zhmt + reference: '' + a6c02861-d050-440f-ac1e-c7124f303ca4: !Template + answer_choices: '' + id: a6c02861-d050-440f-ac1e-c7124f303ca4 + jinja: "问题:{{question}}\n 上下文:{{context}}\n 从上下文中回答:||| {{answers.text[0]}}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: qaanswera_zhmt + reference: '' + ac07833e-0bd5-4870-8b6d-92db9bf2f152: !Template + answer_choices: '' + id: ac07833e-0bd5-4870-8b6d-92db9bf2f152 + jinja: '参考下面的文章,然后用与文章相同的语言回答问题: + + + 段落:{{context}} + + + 问题:{{question}} + + ||| + + {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: refercqa_zhmt + reference: '' + b6d74b4c-da58-464b-b5ba-8b3a101a233e: !Template + answer_choices: '' + id: b6d74b4c-da58-464b-b5ba-8b3a101a233e + jinja: '{{context}} + + + 参考上述上下文,{{question}} ||| + + + {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: creferenceqa_zhmt + reference: '' + decdbd29-f0ac-4dec-8a22-205add9ffa04: !Template + answer_choices: '' + id: decdbd29-f0ac-4dec-8a22-205add9ffa04 + jinja: '{{ context[:answers.answer_start[0]-5]}}... 继续上述操作,使其回答“{{question}}”:||| + {{ context[answers.answer_start[0]-5:]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' diff --git a/promptsource/templates/mlqa/mlqa.zh.hi/templates.yaml b/promptsource/templates/mlqa/mlqa.zh.hi/templates.yaml new file mode 100644 index 000000000..2c5d1c213 --- /dev/null +++ b/promptsource/templates/mlqa/mlqa.zh.hi/templates.yaml @@ -0,0 +1,127 @@ +dataset: mlqa +subset: mlqa.zh.hi +templates: + 42b3f4ee-3993-460c-bf8a-b229b707ee98: !Template + answer_choices: '' + id: 42b3f4ee-3993-460c-bf8a-b229b707ee98 + jinja: "问题:{{question}}\n 上下文:{{context}}\n 从上下文中回答:||| {{answers.text[0]}}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: qaanswera_zhmt + reference: '' + 51dcde53-0c05-4df0-a89f-655f9e955d7c: !Template + answer_choices: '' + id: 51dcde53-0c05-4df0-a89f-655f9e955d7c + jinja: '{{context}} + + + 参考上述上下文,{{question}} ||| + + + {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: creferenceqa_zhmt + reference: '' + 5d08f1de-f184-492f-b6d0-6054858e0ea1: !Template + answer_choices: '' + id: 5d08f1de-f184-492f-b6d0-6054858e0ea1 + jinja: '我找到了一个用 {{answers.text[0]}} 回答“{{answers.text[0]}}”的文本。它以“{{ context[:10] + }}”开头。可以继续吗? + + ||| {{ context[10:] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longanswers_zhmt + reference: '' + 720ae38b-4393-4238-8bd6-3e36afa27ea6: !Template + answer_choices: '' + id: 720ae38b-4393-4238-8bd6-3e36afa27ea6 + jinja: '参考下面的文章,然后用与文章相同的语言回答问题: + + + 段落:{{context}} + + + 问题:{{question}} + + ||| + + {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: refercqa_zhmt + reference: '' + 9bd32683-1dd0-4648-b946-ae408a216b26: !Template + answer_choices: '' + id: 9bd32683-1dd0-4648-b946-ae408a216b26 + jinja: 'D:{{context}} + + + 问:{{question}} + + + 答:||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: dqa_zhmt + reference: '' + a521cfc3-4970-44f6-9399-e8ab1cfa3df8: !Template + answer_choices: '' + id: a521cfc3-4970-44f6-9399-e8ab1cfa3df8 + jinja: '阅读下面的短文,然后从短文中选出正确的部分来回答下面的问题: + + {{context}} + + {{question}} + + ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: exractingcqa_zhmt + reference: '' + bb8e5370-a72c-44ce-af73-96cd638e1d12: !Template + answer_choices: '' + id: bb8e5370-a72c-44ce-af73-96cd638e1d12 + jinja: '{{ context[:answers.answer_start[0]-5]}}... 继续上述操作,使其回答“{{question}}”:||| + {{ context[answers.answer_start[0]-5:]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' + e2e1ea83-aa4c-4996-a9d3-972ddd3ec297: !Template + answer_choices: '' + id: e2e1ea83-aa4c-4996-a9d3-972ddd3ec297 + jinja: '{{context}} + + 问:{{question}} + + 参考上面的段落,用该段落的语言对给定问题的正确答案是||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: cqreferringa_zhmt + reference: '' diff --git a/promptsource/templates/mlqa/mlqa.zh.vi/templates.yaml b/promptsource/templates/mlqa/mlqa.zh.vi/templates.yaml new file mode 100644 index 000000000..3083aad43 --- /dev/null +++ b/promptsource/templates/mlqa/mlqa.zh.vi/templates.yaml @@ -0,0 +1,127 @@ +dataset: mlqa +subset: mlqa.zh.vi +templates: + 0b765eee-2ef0-4b95-97f2-9c7605f06087: !Template + answer_choices: '' + id: 0b765eee-2ef0-4b95-97f2-9c7605f06087 + jinja: '阅读下面的短文,然后从短文中选出正确的部分来回答下面的问题: + + {{context}} + + {{question}} + + ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: exractingcqa_zhmt + reference: '' + 0e53cfb8-2768-4e9c-bfc0-c129b59987d2: !Template + answer_choices: '' + id: 0e53cfb8-2768-4e9c-bfc0-c129b59987d2 + jinja: '{{ context[:answers.answer_start[0]-5]}}... 继续上述操作,使其回答“{{question}}”:||| + {{ context[answers.answer_start[0]-5:]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longcontinue_zhmt + reference: '' + 1ccb7491-4452-40bc-a704-5aae0a38c0f4: !Template + answer_choices: '' + id: 1ccb7491-4452-40bc-a704-5aae0a38c0f4 + jinja: 'D:{{context}} + + + 问:{{question}} + + + 答:||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: dqa_zhmt + reference: '' + 992e5e75-01cd-4aff-a13c-1daf13aedcd0: !Template + answer_choices: '' + id: 992e5e75-01cd-4aff-a13c-1daf13aedcd0 + jinja: '我找到了一个用 {{answers.text[0]}} 回答“{{answers.text[0]}}”的文本。它以“{{ context[:10] + }}”开头。可以继续吗? + + ||| {{ context[10:] }}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: xp3longanswers_zhmt + reference: '' + cf75a543-faeb-4471-8773-4d70e2c3c08c: !Template + answer_choices: '' + id: cf75a543-faeb-4471-8773-4d70e2c3c08c + jinja: "问题:{{question}}\n 上下文:{{context}}\n 从上下文中回答:||| {{answers.text[0]}}" + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: qaanswera_zhmt + reference: '' + d70b19b0-74cb-4625-a08d-2ca4be1da757: !Template + answer_choices: '' + id: d70b19b0-74cb-4625-a08d-2ca4be1da757 + jinja: '参考下面的段落,然后用与段落相同的语言回答问题: + + + 段落:{{context}} + + + 问题:{{question}} + + ||| + + {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: refercqa_zhmt + reference: '' + e04e225a-a5e6-4e0b-872e-7b13c4c6deb3: !Template + answer_choices: '' + id: e04e225a-a5e6-4e0b-872e-7b13c4c6deb3 + jinja: '{{context}} + + + 参考上述上下文,{{question}} ||| + + + {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: creferenceqa_zhmt + reference: '' + f0c3071c-a94f-418a-9980-7097c4b4d7c8: !Template + answer_choices: '' + id: f0c3071c-a94f-418a-9980-7097c4b4d7c8 + jinja: '{{context}} + + 问:{{question}} + + 参考上面的段落,用该段落的语言对给定问题的正确答案是||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: cqreferringa_zhmt + reference: '' diff --git a/promptsource/templates/pasinit/xlwic/xlwic_en_zh/templates.yaml b/promptsource/templates/pasinit/xlwic/xlwic_en_zh/templates.yaml new file mode 100644 index 000000000..c4277fc29 --- /dev/null +++ b/promptsource/templates/pasinit/xlwic/xlwic_en_zh/templates.yaml @@ -0,0 +1,219 @@ +dataset: pasinit/xlwic +subset: xlwic_en_zh +templates: + 09504d75-457e-4a54-8ad1-7ca3b2104fe7: !Template + answer_choices: 不 ||| 是的 + id: 09504d75-457e-4a54-8ad1-7ca3b2104fe7 + jinja: '第 1 句:{{context_1}} + + 句子 2:{{context_2}} + + + 确定单词“{{target_word}}”在两个句子中的使用是否相同。是还是不是? + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: same_sense_zhmt + reference: '' + 123f732d-44a2-4215-87cd-f21ad10ca905: !Template + answer_choices: 不 ||| 是的 + id: 123f732d-44a2-4215-87cd-f21ad10ca905 + jinja: '家庭作业 + + + 判断“{{target_word}}”这个词在以下两个句子中的含义是否相同。回答是或否。 + + {{context_1}} + + {{context_2}} + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: grammar_homework_zhmt + reference: '' + 687e7297-1f5e-47b6-8e5a-51667f3033f4: !Template + answer_choices: 不 ||| 是的 + id: 687e7297-1f5e-47b6-8e5a-51667f3033f4 + jinja: '{{context_1}} + + {{context_2}} + + {{target_word}} 的类似意义? + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: similar-sense_zhmt + reference: '' + 6e431c33-dfde-4f76-83bc-a44e6cf14b69: !Template + answer_choices: 不 ||| 是的 + id: 6e431c33-dfde-4f76-83bc-a44e6cf14b69 + jinja: '“{{target_word}}”这个词有多种含义。第 1 句和第 2 句的意思相同吗?是还是不是? + + + 第 1 句:{{context_1}} + + 句子 2:{{context_2}} + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: polysemous_zhmt + reference: '' + 73aa2454-4356-40ef-b846-fa4d854b814f: !Template + answer_choices: 不 ||| 是的 + id: 73aa2454-4356-40ef-b846-fa4d854b814f + jinja: '确定以下两个句子中是否以相同的方式使用了单词“{{target_word}}”。 + + {{context_1}} + + {{context_2}} + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: question-context_zhmt + reference: '' + 9fe902a6-744f-414b-91ce-50178f5c9be8: !Template + answer_choices: 不 ||| 是的 + id: 9fe902a6-744f-414b-91ce-50178f5c9be8 + jinja: '{{context_1}} + + {{context_2}} + + 问题:“{{target_word}}”这个词在上面两个句子中的含义是否相同? + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: GPT-3-prompt_zhmt + reference: '' + a866bce3-7166-477a-b0b6-9302fdfbe561: !Template + answer_choices: 不 ||| 是的 + id: a866bce3-7166-477a-b0b6-9302fdfbe561 + jinja: '“{{target_word}}”这个词在这两个句子中是否具有相同的含义?是的,不是吗? + + {{context_1}} + + {{context_2}} + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: question-context-meaning-with-label_zhmt + reference: '' + cff7bb69-4f52-4148-8a1c-f901e4e8bf11: !Template + answer_choices: 不 ||| 是的 + id: cff7bb69-4f52-4148-8a1c-f901e4e8bf11 + jinja: '“{{target_word}}”这个词在这两个句子中是否具有相同的含义? + + {{context_1}} + + {{context_2}} + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: question-context-meaning_zhmt + reference: '' + d1938fc0-7719-4066-9cb6-9036505fadb0: !Template + answer_choices: 错误的 ||| 真的 + id: d1938fc0-7719-4066-9cb6-9036505fadb0 + jinja: '句子 A:{{context_1}} + + 句子 B:{{context_2}} + + + “{{target_word}}”在句子 A 和 B 中具有相似的含义。对还是错? + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: affirmation_true_or_false_zhmt + reference: '' + d1aa5411-d568-4fa9-b787-e5829bf9b463: !Template + answer_choices: 不 ||| 是的 + id: d1aa5411-d568-4fa9-b787-e5829bf9b463 + jinja: '{{context_1}} + + {{context_2}} + + 问题:“{{target_word}}”这个词在上面两个句子中的含义是否相同?是的,不是吗? + + ||| {% if label != -1%} + + {{answer_choices[label]}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: GPT-3-prompt-with-label_zhmt + reference: '' diff --git a/promptsource/templates/paws-x/zh/templates.yaml b/promptsource/templates/paws-x/zh/templates.yaml new file mode 100644 index 000000000..1e9b76778 --- /dev/null +++ b/promptsource/templates/paws-x/zh/templates.yaml @@ -0,0 +1,225 @@ +dataset: paws-x +subset: zh +templates: + 0a450b84-66bb-4697-8137-bb223de517e0: !Template + answer_choices: 不 ||| 是的 + id: 0a450b84-66bb-4697-8137-bb223de517e0 + jinja: '第 1 句:{{sentence1}} + + 句子 2:{{sentence2}} + + 问题:我们可以将第 1 句改写为第 2 句吗? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: Rewrite-no-label_zhmt + reference: '' + 11b72ab2-3a8f-4d23-b03e-bf75dc82ce77: !Template + answer_choices: 不 ||| 是的 + id: 11b72ab2-3a8f-4d23-b03e-bf75dc82ce77 + jinja: '{{sentence1}} 问题:{{sentence2}} 转述与否? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: PAWS-ANLI GPT3-no-label_zhmt + reference: '' + 2e9c15db-fb24-4157-82be-03464ce73479: !Template + answer_choices: 不 ||| 是的 + id: 2e9c15db-fb24-4157-82be-03464ce73479 + jinja: '第 1 句:{{sentence1}} + + 句子 2:{{sentence2}} + + 问题:我们可以将第 1 句改写为第 2 句吗?是还是不是? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: Rewrite_zhmt + reference: '' + 3a0714c3-9544-4b1c-b3cb-1e6cbcc3e41d: !Template + answer_choices: 不 ||| 是的 + id: 3a0714c3-9544-4b1c-b3cb-1e6cbcc3e41d + jinja: '第 1 句:{{sentence1}} + + 句子 2:{{sentence2}} + + 问题:第 1 句是否对第 2 句进行了转述? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: Concatenation-no-label_zhmt + reference: '' + 54a8cbde-cc16-4abd-80e6-b7e057a247a1: !Template + answer_choices: 不 ||| 是的 + id: 54a8cbde-cc16-4abd-80e6-b7e057a247a1 + jinja: '{{sentence1}} + + 这是对以下句子的转述吗? + + {{sentence2}}? + + 是还是不是。 + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: context-question_zhmt + reference: '' + 6c74272e-9df6-4e36-bbe7-61703a68f82b: !Template + answer_choices: 不 ||| 是的 + id: 6c74272e-9df6-4e36-bbe7-61703a68f82b + jinja: '第 1 句:{{sentence1}} + + 句子 2:{{sentence2}} + + 问题:第 1 句是否对第 2 句进行了转述?是还是不是? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: Concatenation_zhmt + reference: '' + 8e3d798a-f886-4291-9fc4-18f43786b84b: !Template + answer_choices: 不 ||| 是的 + id: 8e3d798a-f886-4291-9fc4-18f43786b84b + jinja: '第 1 句:{{sentence1}} + + 句子 2:{{sentence2}} + + 问:第1句和第2句表达的意思一样吗?是还是不是? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: Meaning_zhmt + reference: '' + a4df0518-d0a1-4092-9217-f0c11cd96ef8: !Template + answer_choices: 不 ||| 是的 + id: a4df0518-d0a1-4092-9217-f0c11cd96ef8 + jinja: '{{sentence1}} + + 这是对以下句子的转述吗? + + {{sentence2}}? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: context-question-no-label_zhmt + reference: '' + aeab7810-808d-48ca-9dec-93fc26635991: !Template + answer_choices: 不 ||| 是的 + id: aeab7810-808d-48ca-9dec-93fc26635991 + jinja: '判断以下两个句子是否相互转述。 + + 发送 1:{{sentence1}} + + 发送 2:{{sentence2}} + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: task_description-no-label_zhmt + reference: '' + b45b4873-b819-46d1-b9af-c4229eb8dbfd: !Template + answer_choices: 错误的 ||| 真的 + id: b45b4873-b819-46d1-b9af-c4229eb8dbfd + jinja: '{{sentence1}} 问题:{{sentence2}} 对还是错? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: PAWS-ANLI GPT3_zhmt + reference: '' + e067afb8-5f0f-48d0-b917-92dcfbcc3d9f: !Template + answer_choices: 不 ||| 是的 + id: e067afb8-5f0f-48d0-b917-92dcfbcc3d9f + jinja: '第 1 句:{{sentence1}} + + 句子 2:{{sentence2}} + + 问:第1句和第2句表达的意思一样吗? + + ||| + + {{answer_choices[label]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: Meaning-no-label_zhmt + reference: '' + ec43a8d0-b64a-4066-9f99-f19caa06ff50: !Template + answer_choices: '' + id: ec43a8d0-b64a-4066-9f99-f19caa06ff50 + jinja: '{% if label == 1 %} + + 转述句子:{{sentence1}} + + ||| + + {{sentence2}} + + {% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: paraphrase-task_zhmt + reference: '' diff --git a/promptsource/templates/xcopa/zh/templates.yaml b/promptsource/templates/xcopa/zh/templates.yaml index e354805a5..4ee0ef4c2 100644 --- a/promptsource/templates/xcopa/zh/templates.yaml +++ b/promptsource/templates/xcopa/zh/templates.yaml @@ -92,3 +92,89 @@ templates: original_task: null name: i_am_hesitating_zhmt reference: '' + 4822dc0c-b91c-44a9-8436-6e227e545859: !Template + answer_choices: '{{choice1}} ||| {{choice2}}' + id: 4822dc0c-b91c-44a9-8436-6e227e545859 + jinja: "{{ premise }} \n\n我正在考虑两个选项。请帮我最有可能的{% if question == \"cause\" %}导因:{% else %}后果:{%\ + \ endif %}\n- {{choice1}}\n- {{choice2}} ||| {% if label != -1 %}{{ answer_choices[label]\ + \ }}{%endif%}" + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: i_am_hesitating_zhht + reference: '' + 49e8644c-4e5a-48e5-a52a-12aa5b5d8d27: !Template + answer_choices: '{{choice1}} ||| {{choice2}}' + id: 49e8644c-4e5a-48e5-a52a-12aa5b5d8d27 + jinja: '{{ premise }} {% if question == "cause" %}这个会发生是因为... {% + else %}结果是... {% endif %} + + 帮我挑选合适的选项: + + - {{choice1}} + + - {{choice2}} ||| {% if label != -1 %}{{ answer_choices[label] }}{%endif%}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: plausible_alternatives_zhht + reference: '' + 5781b211-6eb9-49aa-880c-9669cbdb4017: !Template + answer_choices: '{{choice1}} ||| {{choice2}}' + id: 5781b211-6eb9-49aa-880c-9669cbdb4017 + jinja: '"{{ answer_choices[0] }}"还是"{{ answer_choices[1] }}"? {{ premise }} + {% if question == "cause" %}因为{% else %}所以{% endif %} ||| {% if label + != -1 %}{{ answer_choices[label] }}{% endif %}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: C1 or C2? premise_zhht + reference: "Adapted from Perez et al. 2021 and Schick & Sch\xFCtz 2021." + 9b9cc9a2-2ca9-43f5-9a1f-b5831ed5d77d: !Template + answer_choices: '{{choice1}} ||| {{choice2}}' + id: 9b9cc9a2-2ca9-43f5-9a1f-b5831ed5d77d + jinja: "{{ premise }} \n\n哪个是最好的答案?\n- {{choice1}}\n- {{choice2}}\n\ + \n我们正在考虑{% if question == \"cause\" %}起因{% else %}后果\ + \ {% endif %}\n||| {% if label != -1 %}{{answer_choices[label]}}{%endif%}" + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: best_option_zhht + reference: '' + bd78db22-6b60-40e4-840b-b2495153c738: !Template + answer_choices: '{{choice1}} ||| {{choice2}}' + id: bd78db22-6b60-40e4-840b-b2495153c738 + jinja: '{{ premise }} + + + 请选择最贴切的答案: {% if question == "cause" %}导因:{% else %}结果: + {% endif %} + + - {{choice1}} + + - {{choice2}} ||| {% if label != -1 %}{{ answer_choices[label] }}{%endif%}' + metadata: !TemplateMetadata + choices_in_prompt: true + languages: + - zh + metrics: + - Accuracy + original_task: true + name: cause_effect_zhht + reference: '' diff --git a/promptsource/templates/xquad/xquad.zh/templates.yaml b/promptsource/templates/xquad/xquad.zh/templates.yaml new file mode 100644 index 000000000..e31f99b75 --- /dev/null +++ b/promptsource/templates/xquad/xquad.zh/templates.yaml @@ -0,0 +1,120 @@ +dataset: xquad +subset: xquad.zh +templates: + 0e89de82-c36f-4520-830b-a267e7a8fd36: !Template + answer_choices: '' + id: 0e89de82-c36f-4520-830b-a267e7a8fd36 + jinja: '阅读下面的短文,回答下面的问题: + + {{context}} + + {{question}} + + ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: read_passage_zhmt + reference: '' + 261c8af4-66ac-4723-9d1c-3b4de045792d: !Template + answer_choices: '' + id: 261c8af4-66ac-4723-9d1c-3b4de045792d + jinja: '{{context}} + + + 问:{{question}} + + + 参考上面的段落,给定问题的正确答案是||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer_given_context_and_question_zhmt + reference: '' + 6cb98410-8b6e-4a1b-aff8-927299472184: !Template + answer_choices: '' + id: 6cb98410-8b6e-4a1b-aff8-927299472184 + jinja: '参考下面的短文,回答下列问题: + + + 段落:{{context}} + + + 问题:{{question}} + + ||| + + {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer_question_given_context_zhmt + reference: '' + 7ccc7635-e481-45e6-84fc-52afd76e8e0d: !Template + answer_choices: '' + id: 7ccc7635-e481-45e6-84fc-52afd76e8e0d + jinja: '{{context}} + + + 从上面的段落中,一个以“{{answers["text"][0]}}" 为答案的合理问题将是:||| {{question}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: jeopardy_zhmt + reference: '' + 8e0f1b8e-624d-4d1d-8844-9721af339732: !Template + answer_choices: '' + id: 8e0f1b8e-624d-4d1d-8844-9721af339732 + jinja: '{{context}} + + + 从上面的段落中产生一个问题:||| {{question}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: given_context_generate_question_zhmt + reference: '' + 91964364-dcb8-46fd-88a4-e731482446a3: !Template + answer_choices: '' + id: 91964364-dcb8-46fd-88a4-e731482446a3 + jinja: '{{context}} + + + 参考上述上下文,{{question}} ||| + + + {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: answer_the_question_zhmt + reference: '' + cb18f7a5-1ecb-4729-a9fa-83dbd38e08cb: !Template + answer_choices: '' + id: cb18f7a5-1ecb-4729-a9fa-83dbd38e08cb + jinja: '{{context}} + + + 问:{{question}} + + + 答:||| {{answers["text"][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: null + languages: null + metrics: null + original_task: null + name: given_context_answer_question_variation_zhmt + reference: ''