-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.py
44 lines (25 loc) · 738 Bytes
/
main.py
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
35
36
37
38
39
40
41
42
43
44
import hashtagfind
import preprocess
import classifier
import pymongo
import ngrams
import label
def get_db():
mongo_client = pymongo.MongoClient('127.0.0.1', 27017)
twitter = mongo_client.twitter
return twitter
def main():
twitter = get_db()
#preprocess.remove(twitter)
#preprocess.preprocess(twitter)
#ngrams.get_unigram(twitter)
#ngrams.get_bigram(twitter)
#ngrams.get_trigram(twitter)
#label.label(twitter)
classifier.naive_bayes_classifier(twitter, 1)
#classifier.max_ent_classifier(twitter, 1)
#classifier.svm_classifier(twitter, 1)
#classifier.scikit_classifier(twitter, 1)
#hashtagfind.hashtagfind(twitter, 1600)
if __name__ == '__main__':
main()