eaedk's picture
init
081c5aa
raw
history blame contribute delete
No virus
584 Bytes
def make_incredible_predictions():
"This is the best function that have created"
pass
def preprocess(text):
"preprocessing function of the input tweet"
new_text = []#initiate an empty list
#split text by space
for t in text.split(" "):
#set username to @user
t = '@user' if t.startswith('@') and len(t) > 1 else t
#set tweet source to http
t = 'http' if t.startswith('http') else t
#store text in the list
new_text.append(t)
#change text from list back to string
return " ".join(new_text)