Hi ! Do you mean that the labels are included in the file names ?
Here is an example on how to load one of the classes using glob patterns:
data_files = {"train": "path/to/data/*<class_name>*.txt"}
dataset = load_dataset("text": data_files=data_files}, split="train")

Then you can add the column with the label:
dataset = dataset.add_column("label", ["<class_name>"] * len(dataset))

Finally if you wish to combine the datasets of each class feel free to take a look at concatenate_datasets 1 or interleave_datasets