INNER CODE UNIT · Python
get_train_examples
hooshvare/parsbert · scripts/utils.py:38
def get_train_examples(self, data_dir):
"""Gets a collection of :class:`InputExample` for the train set."""
return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train")
def get_dev_examples(self, data_dir):
"""Gets a collection of :class:`InputExample` for the dev set."""
return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev")
def get_test_examples(self, data_dir):
"""Gets a collection of :class:`InputExample` for the test set."""
return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test")
def set_labels(self, labels):
self._labels = labels
def get_labels(self):
"""Gets the list of labels for this data set."""
return list(self._labels)