Skip to content

Instantly share code, notes, and snippets.

@piEsposito
Created April 28, 2020 17:38
Show Gist options
  • Save piEsposito/b505bcf98df9a90c3babc8077c805b25 to your computer and use it in GitHub Desktop.
Save piEsposito/b505bcf98df9a90c3babc8077c805b25 to your computer and use it in GitHub Desktop.
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