def load_dataset(data_name):
if data_name == '<STR_LIT>' or data_name == '<STR_LIT>':<EOL><INDENT>train_dataset, output_size = _load_file(data_name)<EOL>vocab, max_len = _build_vocab(data_name, train_dataset, [])<EOL>train_dataset, train_data_lengths = _preprocess_dataset(train_dataset, vocab, max_len)<EOL>return vocab, max_len, output_size, train_dataset, train_data_lengths<EOL><DEDENT>else:<EOL><INDENT>train_dataset, test_dataset, output_size = _load_file(data_name)<EOL>vocab, max_len = _build_vocab(data_name, train_dataset, test_dataset)<EOL>train_dataset, train_data_lengths = _preprocess_dataset(train_dataset, vocab, max_len)<EOL>test_dataset, test_data_lengths = _preprocess_dataset(test_dataset, vocab, max_len)<EOL>return vocab, max_len, output_size, train_dataset, train_data_lengths, test_dataset,test_data_lengths<EOL><DEDENT>
Load sentiment dataset.