Skip to content

Instantly share code, notes, and snippets.

@frenzy2106
Created March 18, 2020 09:36
Show Gist options
  • Save frenzy2106/75c96a6fad301a6a0fee4388995b482d to your computer and use it in GitHub Desktop.
Save frenzy2106/75c96a6fad301a6a0fee4388995b482d to your computer and use it in GitHub Desktop.
#Loading the test data
test_tweets = pd.read_csv("test_tweets_anuFYb8.csv")
test_tweets.shape
#cleaning the text
test_data = test_tweets['tweet']
clean_test_data = clean_corpus(test_data)
#text to sequence and padding
clean_test_data_token = tokenizer.texts_to_sequences(clean_test_data)
clean_test_data_pad = pad_sequences(clean_test_data_token,maxlen=25,padding='post')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment