Last active
October 29, 2017 12:56
-
-
Save darcwader/cee68318e3607a88ffc4fc6c4068b723 to your computer and use it in GitHub Desktop.
spam
This file contains hidden or 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
| file_name = 'SMSSpamCollection' | |
| with open(file_name) as f: | |
| corpus = f.readlines() | |
| print("there are {} messages".format(len(corpus))) | |
| corpus = [x.strip() for x in corpus] #remove trailing \n from lines | |
| for i,message in enumerate(corpus[:10]): | |
| print(i, message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment