This file contains 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
#!/usr/bin/env python | |
""" | |
Remove emoji from a text file and print it to stdout. | |
Usage | |
----- | |
python remove-emoji.py input.txt > output.txt | |
""" |
This file contains 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
import africastalking | |
username = "africa username" # use 'sandbox' for development in the test environment | |
# use your sandbox app API key for development in the test environment | |
api_key = "africa's talking api key" | |
africastalking.initialize(username, api_key) | |
# # Use the service synchronously |
This file contains 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
import pandas as pd | |
from sklearn import linear_model | |
from sklearn.ensemble import VotingClassifier | |
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer | |
from sklearn.model_selection import GridSearchCV | |
from sklearn.naive_bayes import MultinomialNB | |
from sklearn.pipeline import Pipeline | |
Y_COLUMN = "author" | |
TEXT_COLUMN = "text" |