-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
35 lines (25 loc) · 1002 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
# -*- coding: utf-8 -*-
import sys
import datetime
from addAbsoluteEfficiency import addAbsoluteEfficiency
from addVisibilityGraph import addVisibilityGraph
from fillClearTweet import *
from normalize import *
if __name__ == "__main__":
print ("Start: {0}".format(datetime.datetime.now()))
connectMongoDB = Connect2MongoDB('localhost', 27017)
connectMongoDB.setDB('Huelga')
db = MongoDB(connectMongoDB)
graph = Neo4jDB (Connect2Neo4J (CONST_NEO4J_URI, CONST_NEO4J_USER, CONST_NEO4J_PASSWORD))
"""tweets = db.find(MongoDB.TWEETS_COLLECTION)
#Inside of MongoDB.find() --> 0 = MongoDB.TWEETS_COLLECTION
#tweet = db.find(0, getTweet("id_str",'917946195410128897'))
process = ProcessTweet (db, graph)
for t in tweets:
process.process(t)"""
#fillClearTweet(db, graph)
addAbsoluteEfficiency(db)
addVisibilityGraph(db, graph)
normalize(db)
graph.connect2Neo4J.closeDB()
print ("\nStop: {0}".format(datetime.datetime.now()))