π Yes NoΒΆ
templates.grammatical_error_detection.yes_no
InputOutputTemplate
(
instruction="You are given a text. Does this text contain any grammatical errors or spelling mistakes? Answer only "Yes" or "No".
",
input_format="Text: {text}",
output_format="{label}",
target_prefix="Answer: ",
postprocessors=[
"processors.take_first_word",
"processors.lower_case",
"processors.yes_no_to_int",
"processors.cast_to_float_return_nan_if_failed",
],
)
[source]Explanation about InputOutputTemplateΒΆ
Generate field βsourceβ from fields designated as input, and fields βtargetβ and βreferencesβ from fields designated as output, of the processed instance.
Args specify the formatting strings with which to glue together the input and reference fields of the processed instance into one string (βsourceβ and βtargetβ), and into a list of strings (βreferencesβ).
References: processors.cast_to_float_return_nan_if_failed, processors.take_first_word, processors.yes_no_to_int, processors.lower_case
Read more about catalog usage here.