INNER CODE UNIT · Python

get_dev_examples

hooshvare/parsbert · scripts/utils.py:42

    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)

    def _create_examples(self, lines, set_type):
        """Creates examples for the training and dev sets."""
        examples = []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…