Changes
1 changed files (+2/-1)
-
-
@@ -23,7 +23,8 @@ text = [unescape(sub(r'<[^>]*>', ' ', status[2])) for status in statuses]# Extract all words from statuses words = [word for message in text for word in message.split()] # Remove URLs and special characters and convert to lowercase words = [sub(r'[^a-z0-9]', '', word.lower()) for word in words if word.find('://') == -1] words = [sub(r'[^a-z0-9]', '', word.lower()) for word in words if word.find('://') == -1] # Remove empty strings words = [word for word in words if word != '']
-