-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
34 lines (29 loc) · 867 Bytes
/
constants.py
File metadata and controls
34 lines (29 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from nltk.corpus import stopwords
APPOSTROPHES = {
"don't" : "do not",
"won't" : "will not",
"it's" : "it is",
"can't" : "can not",
"I'll" : "I will",
"I've" : "I have",
"you're" : "you are",
"didn't" : "did not",
"she's" : "she is",
"they're" : "they are",
"we're" : "we are",
"you've" : "you have",
"aren't" : "are not",
"she'd" : "she would",
"he'd" : "he would",
"let's" : "let us",
"we've" : "we have",
"couldn't": "could not",
"who's" : "who is",
}
original_tweet = "I luv my <3 iphone & you're awsm apple. DisplayIsAwesome, sooo happppppy :) http://www.apple.com"
SLANGS = []
with open("slangwords.txt") as f:
for line in f:
slang, _ = line.split('\n')
SLANGS.append(slang)
cachedStopWords = stopwords.words("english")