<jupyter_start><jupyter_text>Testing Data Cleaning<jupyter_code>testing_data.head(5)
testing_data.describe(include="all")
test_tweets = testing_data["text"].values
print(len(test_tweets))
test_documents = []
for i in range(len(test_tweets)):
    test_documents.append(word_tokenize(test_tweets[i]))
print(test_documents[0])
print(len(test_documents))
test_documents = [clean_tweet(tweet) for tweet in test_documents]
print(test_documents[0])
print(len(test_documents))
test_tweet_documents = [" ".join(tweet) for tweet in test_documents]
print(test_tweet_documents[0])
print(len(test_documents))
count_vect = CountVectorizer(max_features=1100)
x_train = count_vect.fit_transform(train_tweet_documents)
y_train = sentiments

x_test = count_vect.transform(test_tweet_documents)
print(len(train_tweet_documents))
print(len(test_tweet_documents))
clf = RandomForestClassifier(n_estimators=2000, n_jobs=-1)
clf.fit(x_train, y_train)
y_test = clf.predict(x_test)
y_test
np.savetxt("prediction.csv", y_test, fmt='%s')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12403846153846154, 'fraction_numerical': 0.0125, 'mean_word_length': 11.851851851851851, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '607536', 'license': 'MIT', 'n_tokens_mistral': 417, 'n_tokens_neox': 388, 'n_words': 52, 'path': 'Twitter US Airline Sentiment Analysis.ipynb', 'repo_name': 'Ekansh1605/Project---Twitter-US-Airline-Sentiment-Analysis', 'size': '1040'}