def create(model_config, batch_size, vectors=None):
path = model_config.data_dir('<STR_LIT>')<EOL>text_field = data.Field(lower=True, tokenize='<STR_LIT>', batch_first=True)<EOL>label_field = data.LabelField(is_target=True)<EOL>train_source, test_source = IMDBCached.splits(<EOL>root=path,<EOL>text_field=text_field,<EOL>label_field=label_field<EOL>)<EOL>text_field.build_vocab(train_source, max_size=<NUM_LIT>, vectors=vectors)<EOL>label_field.build_vocab(train_source)<EOL>train_iterator, test_iterator = data.BucketIterator.splits(<EOL>(train_source, test_source),<EOL>batch_size=batch_size,<EOL>device=model_config.torch_device(),<EOL>shuffle=True<EOL>)<EOL>return TextData(<EOL>train_source, test_source, train_iterator, test_iterator, text_field, label_field<EOL>)<EOL>
Create an IMDB dataset