tlt.datasets.text_classification.text_classification_dataset.TextClassificationDataset

class tlt.datasets.text_classification.text_classification_dataset.TextClassificationDataset(dataset_dir, dataset_name='', dataset_catalog='')[source]

Base class for a text classification dataset

__init__(dataset_dir, dataset_name='', dataset_catalog='')[source]

Class constructor

Methods

__init__(dataset_dir[, dataset_name, ...])

Class constructor

get_batch()

Get a single batch of images and labels from the dataset

get_str_label(numerical_value)

Returns the string label (class name) associated with the specified numerical value.

Attributes

class_names

dataset

The framework dataset object

dataset_catalog

The string name of the dataset catalog (or None)

dataset_dir

Host directory containing the dataset files

dataset_name

Name of the dataset

test_subset

A subset of the dataset held out for final testing/evaluation

train_subset

A subset of the dataset used for training

validation_subset

A subset of the dataset used for validation/evaluation