MCPcopy Create free account
hub / github.com/THUDM/GLM / get_classifier_input

Method get_classifier_input

tasks/superglue/dataset.py:421–430  ·  view source on GitHub ↗
(self, example: InputExample, tokenizer)

Source from the content-addressed store, hash-verified

419 return ["False", "True"]
420
421 def get_classifier_input(self, example: InputExample, tokenizer):
422 target = example.meta['span1_text']
423 pronoun_idx = example.meta['span2_index']
424
425 # mark the pronoun with asterisks
426 words_a = example.text_a.split()
427 words_a[pronoun_idx] = '*' + words_a[pronoun_idx] + '*'
428 text_a = ' '.join(words_a)
429 text_b = target
430 return text_a, text_b
431
432 def _create_examples(self, path: str, set_type: str, cloze_eval=True) -> List[InputExample]:
433 examples = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected