-
Notifications
You must be signed in to change notification settings - Fork 0
/
socialGamers.py
36 lines (30 loc) · 1.08 KB
/
socialGamers.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
# -*- coding: utf-8 -*-
"""
socialGamers.py
This part is designed to support the data found in Section 4.A of the report.
@author: realhire
"""
from graphBuilder import graphBuilder
gamerTopic = {'140mafia': 2634, 'spymaster': 2304, 'vampirebite': 0}
i = 21
print "Gathering day ", i, "'s data..."
m = graphBuilder("tc21.txt")
print "apply topic filer and build the graph..."
m.topic_filter(gamerTopic)
print "outputing target file..."
m.outputToGexf()
print "socialGamer info analyzed complete. Results in", m.outfile
'''
# This part is a demonstration of topic collector and degree filter
print "find today's top ten topic in: ", m.infile, "..."
m.todayTopTenHashtag()
print "Today's top ten hashtags are: ", m.todayTopic
print "processing reply, retweet and hashtag: ", m.infile, "..."
m.processReplyRetweetHashtag(m.todayTopic)
degreeRange = [0, float("inf")]
print "filter out nodes not in degree range: [", degreeRange[0], ", ", degreeRange[1], "]..."
m.degree_filter(*degreeRange)
print "outputing target file..."
m.outputToGexf()
print "graph builder finised. Results in ", m.outfile
'''