MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / get_test_examples

Method get_test_examples

NLP/NAACL2019-MPM/reader.py:405–420  ·  view source on GitHub ↗
(self, data_dir, header=False)

Source from the content-addressed store, hash-verified

403 return examples
404
405 def get_test_examples(self, data_dir, header=False):
406 lines = self._read_csv(data_dir +
407 '/SubtaskA_EvaluationData_labeled.csv')
408 examples = []
409 for i, line in enumerate(lines):
410 if i == 0 and header:
411 continue
412 guid = line[0]
413 text_a = clean_str(line[1])
414 text_a = tokenization.convert_to_unicode(text_a)
415 text_b = None
416 label = line[2]
417 examples.append(
418 InputExample(
419 guid=guid, text_a=text_a, text_b=text_b, label=label))
420 return examples
421
422 def get_labels(self):
423 """See base class."""

Callers

nothing calls this directly

Calls 4

_read_csvMethod · 0.95
clean_strFunction · 0.85
InputExampleClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected