Spaces:
Build error
Build error
File size: 13,777 Bytes
ab13cee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
dataset: acronym_identification
templates:
64f438f2-9968-459f-82d2-24bad632b358: !Template
answer_choices: null
id: 64f438f2-9968-459f-82d2-24bad632b358
jinja: "{% set random_abbr = '' %}\n{% set _dummy = none %}\n{% set abbr_exp_dict\
\ = namespace(value = {}) %}\n{% set abbr_string=namespace(value='') %}\n{%\
\ set exp_string=namespace(value='')%}\n \n{% for label_idx in range(labels|length)\
\ %}\n {% if labels[label_idx] == 0 %}{# Long Beginning #}\n {% set exp_string.value\
\ = tokens[label_idx] %}{# Create new long string #}\n {% elif labels[label_idx]\
\ == 1 %}{# Short Beginning #}\n {% if abbr_string.value!='' and abbr_string.value\
\ not in abbr_exp_dict.value.keys()%}{# Some string already present #}\n \
\ {% set _dummy = abbr_exp_dict.value.update({abbr_string.value:''}) %}{#\
\ Discard this string as a new short string is coming #}\n {% endif %}\n\
\ {% set abbr_string.value = tokens[label_idx] %}{# Create new short string\
\ #}\n {% elif labels[label_idx] == 2 %}{# Long Intermediate #}\n {% set\
\ exp_string.value = exp_string.value+' '+tokens[label_idx] %}{# Update existing\
\ string #}\n {% elif labels[label_idx] == 3 %}{# Short Intermediate #}\n \
\ {% set abbr_string.value = abbr_string.value+tokens[label_idx] %}{# Update\
\ existing string #}\n {% else %}{# Other #}\n {# Both non-empty, and first\
\ characters match #}\n {% if abbr_string.value!='' and exp_string.value!=''\
\ and exp_string.value.split()[0][0]|lower in abbr_string.value|lower and exp_string.value.split()[-1][0]|lower\
\ in abbr_string.value|lower%}\n {# Update both the dictionaries #}\n \
\ {% set _dummy = abbr_exp_dict.value.update({abbr_string.value:exp_string.value})\
\ %}\n {# Empty both the strings #}\n {% set abbr_string.value= ''\
\ %}\n {% set exp_string.value= '' %}\n {% endif %}\n {% endif %}\n\
{% endfor %}\n{# Both non-empty, and first characters match #}\n{% if abbr_string.value!=''\
\ and exp_string.value!='' %}\n {% if exp_string.value.split()[0][0]|lower\
\ in abbr_string.value|lower and exp_string.value.split()[-1][0]|lower in abbr_string.value|lower\
\ %}\n {# Update both the dictionaries #}\n {% set _dummy = abbr_exp_dict.value.update({abbr_string.value:exp_string.value})\
\ %}\n {% elif abbr_exp_dict.value.items()|length==0 %}\n {% set _dummy\
\ = abbr_exp_dict.value.update({abbr_string.value:exp_string.value}) %}\n {%\
\ endif %}\n{% else %}\n {% if abbr_string.value!=''%}\n {% if abbr_string.value\
\ not in abbr_exp_dict.value.keys() %}\n {% set _dummy = abbr_exp_dict.value.update({abbr_string.value:''})\
\ %}\n {% endif %}\n {% endif %}\n{% endif %}\n{% if abbr_exp_dict.value\
\ %}\n{% set random_abbr = abbr_exp_dict.value.keys()|list|choice %}\nGiven\
\ the following tokens, find the expansion of {{random_abbr}}. Return {{\"Unclear\"\
}} if the expansion can't be found.\n \n{{tokens|join(' ')}}\n|||\n{% if random_abbr\
\ in abbr_exp_dict.value.keys() and abbr_exp_dict.value[random_abbr]!='' %}\n\
{{abbr_exp_dict.value[random_abbr]}}\n{% else %}\nUnclear\n{% endif %}\n{% endif\
\ %}"
metadata: !TemplateMetadata
choices_in_prompt: null
metrics: []
original_task: false
name: find_expansion
reference: Given the tokens, find the expansion of an abbreviation in the tokens.
81babc83-18cd-4eed-a343-8ede56b21df5: !Template
answer_choices: null
id: 81babc83-18cd-4eed-a343-8ede56b21df5
jinja: "Given the BIO encoding as follows: \"{{\"B-short\"}}\" and \"{{\"I-short\"\
}}\" represent the beginning and intermediate tokens for abbreviations.\"{{\"\
B-long\"}}\" and \"{{\"I-long\"}}\" represent the beginning and intermediate\
\ tokens for expansions of the abbreviations. All other tokens are represented\
\ by \"{{\"O\"}}\". \nGenerate comma-separated BIO encoding for the following\
\ comma-separated tokens: \n\n{{tokens|join(', ')}}\n|||\n{% for label in labels\
\ %}{{[\"B-long\", \"B-short\", \"I-long\", \"I-short\", \"O\"][label]}}{%\
\ if not loop.last %},{%endif %}{% endfor %}"
metadata: !TemplateMetadata
choices_in_prompt: null
metrics: []
original_task: true
name: bio_encode
reference: Given the comma separated tokens, generate BIO encoding for abbreviations.
8832e5f7-7c45-46da-b85f-71fcb444f264: !Template
answer_choices: null
id: 8832e5f7-7c45-46da-b85f-71fcb444f264
jinja: 'List all the expansions of the acronyms present in the following comma-separated
tokens. Return {{"No expansions found"}} if the expansions can''t be found.
{{tokens|join('', '')}}
|||
{% set abbr_string=namespace(value='''') %}
{% set answer_list=namespace(value=[]) %}
{% for label_idx in range(labels|length) %}
{% if labels[label_idx] == 0 %}
{% set abbr_string.value = tokens[label_idx] %}
{% elif abbr_string.value!='''' and labels[label_idx]==2%}
{% set abbr_string.value = abbr_string.value+'' ''+tokens[label_idx] %}
{% elif abbr_string.value!='''' and labels[label_idx]!=2%}
{% set answer_list.value = answer_list.value +[abbr_string.value] %}
{% set abbr_string.value = '''' %}
{% endif %}
{% if loop.last and abbr_string.value!='''' %}
{% set answer_list.value = answer_list.value +[abbr_string.value] %}
{% endif %}
{% endfor %}
{% if answer_list.value|length!=0 %}
{{ answer_list.value|join('', '') }}
{% else %}
No expansions found.
{% endif %}'
metadata: !TemplateMetadata
choices_in_prompt: null
metrics: []
original_task: false
name: list_expansions
reference: Given the tokens, list the expansion tokens.
cae58242-cde9-472d-ae9e-56fc7e79c0d1: !Template
answer_choices: null
id: cae58242-cde9-472d-ae9e-56fc7e79c0d1
jinja: "List all the acryonyms in the following comma-separated tokens: \n\n{{tokens|join(',\
\ ')}}\n|||\n{% set abbr_string=namespace(value='') %}\n{% set answer_list=namespace(value=[])\
\ %}\n{% for label_idx in range(labels|length) %}\n{% if labels[label_idx] ==\
\ 1 %}\n{% set abbr_string.value = tokens[label_idx] %}\n{% elif abbr_string.value!=''\
\ and labels[label_idx]==3%}\n{% set abbr_string.value = abbr_string.value+tokens[label_idx]\
\ %}\n{% elif abbr_string.value!='' and labels[label_idx]!=3 %}\n{% set answer_list.value\
\ = answer_list.value +[abbr_string.value] %}\n{% set abbr_string.value = ''\
\ %}\n{% endif %}\n{% if loop.last and abbr_string.value!='' %}\n{% set answer_list.value\
\ = answer_list.value +[abbr_string.value] %}\n{% endif %}\n{% endfor %}\n{{\
\ answer_list.value|join(', ') }}"
metadata: !TemplateMetadata
choices_in_prompt: null
metrics: []
original_task: false
name: list_abbreviations
reference: Given the tokens, list the abbreviations.
e4e42433-0e37-4aa5-bbce-7f336ecac6a3: !Template
answer_choices: null
id: e4e42433-0e37-4aa5-bbce-7f336ecac6a3
jinja: "{% set _dummy = none %}\n{% set abbr_exp_dict = namespace(value = {})\
\ %}\n{% set abbr_string=namespace(value='') %}\n{% set exp_string=namespace(value='')%}\n\
\ \n{% for label_idx in range(labels|length) %}\n {% if labels[label_idx] ==\
\ 0 %}{# Long Beginning #}\n {% set exp_string.value = tokens[label_idx]\
\ %}{# Create new long string #}\n {% elif labels[label_idx] == 1 %}{# Short\
\ Beginning #}\n {% if abbr_string.value!='' and abbr_string.value not in\
\ abbr_exp_dict.value.keys()%}{# Some string already present #}\n {% set\
\ _dummy = abbr_exp_dict.value.update({abbr_string.value:''}) %}{# Discard this\
\ string as a new short string is coming #}\n {% endif %}\n {% set abbr_string.value\
\ = tokens[label_idx] %}{# Create new short string #}\n {% elif labels[label_idx]\
\ == 2 %}{# Long Intermediate #}\n {% set exp_string.value = exp_string.value+'\
\ '+tokens[label_idx] %}{# Update existing string #}\n {% elif labels[label_idx]\
\ == 3 %}{# Short Intermediate #}\n {% set abbr_string.value = abbr_string.value+tokens[label_idx]\
\ %}{# Update existing string #}\n {% else %}{# Other #}\n {# Both non-empty,\
\ and first characters match #}\n {% if abbr_string.value!='' and exp_string.value!=''\
\ and exp_string.value.split()[0][0]|lower in abbr_string.value|lower and exp_string.value.split()[-1][0]|lower\
\ in abbr_string.value|lower%}\n {# Update both the dictionaries #}\n \
\ {% set _dummy = abbr_exp_dict.value.update({abbr_string.value:exp_string.value})\
\ %}\n {# Empty both the strings #}\n {% set abbr_string.value= ''\
\ %}\n {% set exp_string.value= '' %}\n {% endif %}\n {% endif %}\n\
{% endfor %}\n{# Both non-empty, and first characters match #}\n{% if abbr_string.value!=''\
\ and exp_string.value!='' %}\n {% if exp_string.value.split()[0][0]|lower\
\ in abbr_string.value|lower and exp_string.value.split()[-1][0]|lower in abbr_string.value|lower\
\ %}\n {# Update both the dictionaries #}\n {% set _dummy = abbr_exp_dict.value.update({abbr_string.value:exp_string.value})\
\ %}\n {% elif abbr_exp_dict.value.items()|length==0 %}\n {% set _dummy\
\ = abbr_exp_dict.value.update({abbr_string.value:exp_string.value}) %}\n {%\
\ endif %}\n{% else %}\n {% if abbr_string.value!=''%}\n {% if abbr_string.value\
\ not in abbr_exp_dict.value.keys() %}\n {% set _dummy = abbr_exp_dict.value.update({abbr_string.value:''})\
\ %}\n {% endif %}\n {% endif %}\n{% endif %}\n \nGiven the following tokens,\
\ find the abbreviations and their expansions. Return {{\"Unclear\"}} if the\
\ expansion can't be found.\n \n{{tokens|join(' ')}}\n|||\n{% for item, value\
\ in abbr_exp_dict.value.items() %}\n{{item}} : {% if value!='' %}{{value}}{%\
\ else %}Unclear{% endif %}\n{%endfor%}"
metadata: !TemplateMetadata
choices_in_prompt: null
metrics: []
original_task: false
name: find_mapping
reference: Given the tokens, find the abbreviation mapping.
eed32ee4-ebc3-499f-ba61-e91461f56ccb: !Template
answer_choices: null
id: eed32ee4-ebc3-499f-ba61-e91461f56ccb
jinja: "{% set random_exp = '' %}{% set _dummy = none %}{% set exp_abbr_dict =\
\ namespace(value = {}) %}{% set abbr_string=namespace(value='') %}{% set exp_string=namespace(value='')%}{%\
\ for label_idx in range(labels|length) %}{% if labels[label_idx] == 0 %}{#\
\ Long Beginning #}{% if exp_string.value!='' and exp_string.value not in exp_abbr_dict.value.keys()\
\ %}{# Some string already present #}{% set _dummy = exp_abbr_dict.value.update({exp_string.value:''})\
\ %}{# Discard this string as a new long string is coming #} {% endif %}{% set\
\ exp_string.value = tokens[label_idx] %}{# Create new long string #}{% elif\
\ labels[label_idx] == 1 %}{# Short Beginning #}{% set abbr_string.value = tokens[label_idx]\
\ %}{# Create new short string #}{% elif labels[label_idx] == 2 %}{# Long Intermediate\
\ #}{% set exp_string.value = exp_string.value+' '+tokens[label_idx] %}{# Update\
\ existing string #}{% elif labels[label_idx] == 3 %}{# Short Intermediate #}{%\
\ set abbr_string.value = abbr_string.value+tokens[label_idx] %}{# Update existing\
\ string #}{% else %}{# Other #}{# Both non-empty, and first characters match\
\ #}{% if abbr_string.value!='' and exp_string.value!='' and exp_string.value.split()[0][0]|lower\
\ in abbr_string.value|lower and exp_string.value.split()[-1][0]|lower in abbr_string.value|lower%}{#\
\ Update both the dictionaries #}{% set _dummy = exp_abbr_dict.value.update({exp_string.value:abbr_string.value})\
\ %}{# Empty both the strings #}{% set abbr_string.value= '' %}{% set exp_string.value=\
\ '' %}{% endif %}{% endif %}{% endfor %}{# Both non-empty, and first characters\
\ match #}{% if abbr_string.value!='' and exp_string.value!='' %}{% if exp_string.value.split()[0][0]|lower\
\ in abbr_string.value|lower and exp_string.value.split()[-1][0]|lower in abbr_string.value|lower\
\ %}{# Update the dictionary #}{% set _dummy = exp_abbr_dict.value.update({exp_string.value:abbr_string.value})\
\ %}{% elif exp_abbr_dict.value.items()|length==0 %}{% set _dummy = exp_abbr_dict.value.update({exp_string.value:abbr_string.value})\
\ %}{% endif %}{% else %}{% if exp_string.value!='' %}{% if exp_string.value\
\ not in exp_abbr_dict.value.keys() %}{% set _dummy = exp_abbr_dict.value.update({exp_string.value:''})\
\ %}{% endif %}{% endif %}{% endif %}{% if exp_abbr_dict.value.items()|length!=0\
\ %}{% set random_exp = exp_abbr_dict.value.keys()|list|choice %}Given the following\
\ tokens, find the abbreviation for: {{random_exp}}. Return \"Unclear\" if the\
\ abbreviation can't be found.\n \n{{tokens|join(' ')}}|||{% if random_exp in\
\ exp_abbr_dict.value.keys() and exp_abbr_dict.value[random_exp]!='' %}{{exp_abbr_dict.value[random_exp]}}{%\
\ else %}Unclear{% endif %}{% endif %}"
metadata: !TemplateMetadata
choices_in_prompt: null
metrics: []
original_task: false
name: find_abbreviation
reference: Given the tokens, find the abbreviation for an expansion.
|