Created
April 28, 2020 17:38
-
-
Save piEsposito/b505bcf98df9a90c3babc8077c805b25 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reviews = [] | |
labels = [] | |
for i in tqdm(range(len(encoded_texts))): | |
if len(encoded_texts[i]) < max_pad_length: | |
reviews.append(encoded_texts[i]) | |
labels.append(1 if labels_as_list[i] == "positive" else 0) | |
assert len(reviews) == len(labels), "The labels and feature lists should have the same time" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment