Commit 3eb3d8b7 authored by Zdenek Kasner's avatar Zdenek Kasner
Browse files

e2e_nlg_cleaned: Exclude QA prompts for now

parent 256a800a
......@@ -2,7 +2,8 @@
Semantic Noise Matters for Neural Natural Language Generation
http://arxiv.org/abs/1911.03905
A cleaned version of the dataset from the E2E NLG Challenge. The dataset contains MR with restaurant attributes and corresponding descriptions.
A cleaned version of the dataset from the E2E NLG Challenge.
The dataset contains MR with restaurant attributes and corresponding descriptions.
Homepage: https://github.com/tuetschek/e2e-cleaning
"""
......@@ -59,6 +60,14 @@ class E2E_NLG_Cleaned(PromptSourceTask):
def stopping_criteria(self):
return '\n'
def max_generation_length(self):
# TODO check
return 512
def invalid_doc_for_prompt(self, doc) -> bool:
"""The QA prompts are not applicable to all the examples, we want to filter these out."""
return self.prompt.name.endswith("_qa")
def doc_to_text(self, doc) -> str:
# if the response is not defined in PS, the text will be an empty string
text = self.prompt.apply(doc)[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment