raiseNotImplementedError('SAT Analogies dataset is not provided. Follow instructions on https://aclweb.org/aclwiki/SAT_Analogy_Questions_(State_of_the_art) to locate.')
raiseNotImplementedError('SAT Analogies dataset is not provided. Follow instructions on https://aclweb.org/aclwiki/SAT_Analogy_Questions_(State_of_the_art) to locate.')
# This format is ONLY for the purposes of deduplication. For the task evaluation, we'll need to find a new strategy,
return""
# to meet the needs of this particular task.
return"first thing is to second thing as\nthird thing is to fourth thing\nfifth thing is to sixth thing\nseventh thing is to eighth thing\nninth thing is to tenth thing\neleventh thing is to twelfth thing\nanswer which is either a b c d or e"
defdoc_to_text(self,doc):
return"{} is to {} as ".format(*doc['query'])
defdoc_to_text(self,doc,include_target=True):
# SAT Analogies is currently only writing out full examples. Partial evaluation needs implementing.
defdoc_to_target(self,doc):
format_qn=lambdax:x[0]+' is to '+x[1]
return"{} is to {}".format(*doc['choices'][doc['answer_key']])
query=doc['query']
defconstruct_requests(self,doc,ctx):
choices=doc['choices']
lls=[
answer=doc['answer_key']
rf.loglikelihood(ctx,"{} is to {}".format(*doc['choices'][i]))[0]