28 | Lorem Ipsum is simply dummy text of the printing and typesetting industry.
29 | Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
30 | when an unknown printer took a galley of type and scrambled it to make a type
31 | specimen book. It has survived not only five centuries, but also the leap into
32 | electronic typesetting, remaining essentially unchanged. It was popularised in
33 | the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | Lorem Ipsum is simply dummy text of the printing and typesetting
44 | Lorem Ipsum has been the industry's standard dummy text ever
45 | when an unknown printer took a galley of type and scrambled it
46 | specimen book. It has survived not only five centuries, but
47 |
48 |
49 | Lorem Ipsum is simply dummy text of the printing and typesetting
50 | Lorem Ipsum has been the industry's standard dummy text ever
51 | when an unknown printer took a galley of type and scrambled it
52 | specimen book. It has survived not only five centuries, but
53 |
54 |
55 | Lorem Ipsum is simply dummy text of the printing and typesetting
56 | Lorem Ipsum has been the industry's standard dummy text ever
57 | when an unknown printer took a galley of type and scrambled it
58 | specimen book. It has survived not only five centuries, but
59 |
60 |
61 | Lorem Ipsum is simply dummy text of the printing and typesetting
62 | Lorem Ipsum has been the industry's standard dummy text ever
63 | when an unknown printer took a galley of type and scrambled it
64 | specimen book. It has survived not only five centuries, but
65 |
31 |
32 |
--------------------------------------------------------------------------------
/Code/html_creator.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # encoding: utf-8
3 | """
4 | html_creator.py
5 |
6 | Created by Elvar Orn Unnthorsson on 07-12-2011
7 | Copyright (c) 2011 ellioman inc. All rights reserved.
8 | """
9 |
10 | import sys
11 | import os
12 | import nltk
13 | import random
14 | from cgi import escape
15 | from os.path import join as pjoin
16 | from mako.template import Template
17 |
18 |
19 | class HTMLCreator(object):
20 |
21 | """
22 | HTMLCreator creates a HTML webpage that displays statistics, word cloud and a list of all
23 | tweets harvested. Must provide the class with the following:
24 | * Name of the html page to create
25 | * Name of the template for the html to follow. The template must have:
26 | *
to place the word cloud
27 | *
to place the tweets
28 | * Twitter data consisting of list of [tweet text, profile pic, user name] lists
29 | """
30 |
31 | def __init__( self, page_name, template_name, twitter_data, stats ):
32 | """
33 | Constructs a new HTMLCreator instance.
34 | """
35 |
36 | super(HTMLCreator, self).__init__()
37 | self.page_name = page_name
38 | self.template_name = template_name
39 | self.twitter_data = twitter_data
40 | self.tweets = ""
41 | self.word_cloud = ""
42 | self.stats_html = ""
43 | self.word_cloud_min_frequency = 5
44 | self.word_cloud_min_font_size = 1
45 | self.word_cloud_max_font_size = 25
46 | self.word_cloud_max_words = 30
47 | self.word_cloud_min_word_length = 3
48 | self.stats = stats
49 |
50 |
51 | def create_html( self ):
52 | """
53 | create_html(self):
54 | Creates the webpage used to show the results from the twitter search and analysis.
55 | """
56 | try:
57 | f = open( pjoin(sys.path[0], "html/template", self.template_name), "r")
58 | html = f.read()
59 | f.close
60 |
61 | # Put the stats in the html
62 | self.__create_stats_info()
63 | index = html.find('
') + len('
')
64 | html_before_stats, html_after_stats = html[:index], html[index:]
65 | html = html_before_stats + self.stats_html + html_after_stats
66 |
67 | # Append the word cloud to the html
68 | self.__create_word_cloud()
69 | index = html.find('
') + len('
')
70 | html_before_cloud, html_after_cloud = html[:index], html[index:]
71 | html = html_before_cloud + '\n' + self.word_cloud + html_after_cloud
72 |
73 | # Append the tweets to the html
74 | self.__create_tweet_list()
75 | index = html.find('
\n'
139 |
140 | # See if it's a positive, negative or neutral tweet and
141 | # put appropriate html class for the tweet
142 | if ( tweet_data[3] == "pos" ):
143 | self.tweets += '\t'*6 + '
'
163 |
164 | if ( count % 3 == 0 ):
165 | self.tweets += '\n' + '\t'*5 + ' '
166 | count += 1
167 |
168 | self.tweets += '\n' + '\t'*5 + ' '
169 |
170 | except:
171 | raise Exception ("Unknown error in HTMLCreator::__create_tweet_list")
172 |
173 |
174 | def __create_word_cloud( self ):
175 | """
176 | __create_word_cloud( self ):
177 | Creates the word cloud part of the webpage. Takes the 30 most
178 | frequent words used and assigns the relevant class to it.
179 | """
180 |
181 | MIN_FREQUENCY = self.word_cloud_min_frequency
182 | MIN_FONT_SIZE = self.word_cloud_min_font_size
183 | MAX_FONT_SIZE = self.word_cloud_max_font_size
184 | MAX_WORDS = self.word_cloud_max_words
185 | MIN_WORD_LENGTH = self.word_cloud_min_word_length
186 |
187 | try:
188 | # Get all words from the tweet search and put them in a list
189 | tweets = []
190 | for search_term, results in self.twitter_data.iteritems():
191 |
192 | for tweet_data in results:
193 | tweet_words = tweet_data[0].split()
194 |
195 | # Append the words in lowercase to remove duplicates
196 | for word in tweet_words:
197 | tweets.append( word.lower() )
198 |
199 | # Compute frequency distribution for the terms
200 | fdist = nltk.FreqDist([term for t in tweets for term in t.split()])
201 |
202 | # Customize a list of stop words as needed
203 | stop_words = nltk.corpus.stopwords.words('english')
204 | stop_words += ['&', '&', '.', '..','...','...', '?', '!', ':', '"', '"', '(', ')', '()', '-', '--']
205 | stop_words += ["RT"] # Common Twitter words
206 |
207 |
208 | # Create output for the WP-Cumulus tag cloud and sort terms by freq
209 | raw_output = sorted([ [term, '', freq] for (term, freq) in fdist.items()
210 | if freq > MIN_FREQUENCY
211 | and term not in stop_words
212 | and len(term) >= MIN_WORD_LENGTH],
213 | key=lambda x: x[2])
214 |
215 | # Scale the font size by the min and max font sizes
216 | # Implementation adapted from
217 | # http://help.com/post/383276-anyone-knows-the-formula-for-font-s
218 | def weightTermByFreq(f):
219 | return (f - min_freq) * \
220 | (MAX_FONT_SIZE - MIN_FONT_SIZE) / \
221 | (max_freq - min_freq) + MIN_FONT_SIZE
222 |
223 | min_freq = raw_output[0][2]
224 | max_freq = raw_output[-1][2]
225 | weighted_output = [[i[0], i[1], weightTermByFreq(i[2])] for i in raw_output]
226 |
227 | # Create the html list
for the results page
228 | myList = []
229 | for (tag, n, font_size) in weighted_output:
230 | myList.append( '\t'*7 + '
%s
' % (font_size, tag) )
231 |
232 | # Minimize the html list to the number specified,
233 | # randomize it and add it to the word cloud string
234 | myList = myList[-MAX_WORDS:]
235 | random.shuffle(myList)
236 | self.word_cloud = '\n'.join(tag[:] for tag in myList)
237 |
238 | except:
239 | raise Exception ("Unknown error in HTMLCreator::__create_word_cloud")
240 |
--------------------------------------------------------------------------------
/Code/sentiment_analyzer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # encoding: utf-8
3 | """
4 | sentiment_analyzer.py
5 |
6 | Created by Elvar Orn Unnthorsson on 07-12-2011
7 | Copyright (c) 2011 ellioman inc. All rights reserved.
8 | """
9 |
10 | import sys
11 | import os
12 | from os.path import join as pjoin
13 | import nltk
14 | from nltk.classify import NaiveBayesClassifier
15 | from nltk.corpus import stopwords
16 | import codecs
17 | import re
18 |
19 | class SentimentAnalyzer:
20 |
21 | """
22 | SentimentAnalyzer trains a Naive Bayes classifier so that it can determine whether a tweet
23 | is positive, negative or neutral. It uses training data that was manually categorized by
24 | the author. The analyze function should be used to classify a list of tweets to analyze.
25 | """
26 |
27 | def __init__( self ):
28 | """
29 | Constructs a new SentimentAnalyzer instance.
30 | """
31 |
32 | self.results = { "positive": 0, "negative": 0, "neutral": 0}
33 | self.data = {}
34 | self.min_word_length = 3
35 |
36 | self.stopSet = set(stopwords.words('english'))
37 | extra_stopwords = ["he's", "she's", "RT" ]
38 | for stopword in extra_stopwords: self.stopSet.add( stopword )
39 |
40 | # Naive Bayes initialization
41 | self.__init_naive_bayes()
42 |
43 |
44 | def analyze(self, data):
45 | """
46 | analyze(self, data):
47 | Input: data. A list of tweets to analyze.
48 | Takes a list of tweets and uses sentiment analysis to determine whether
49 | each tweet is positive, negative or neutral.
50 | Return: The tweets list with each tweet categorized with the proper sentiment value.
51 | """
52 |
53 | return self.__analyse_using_naive_bayes( data )
54 |
55 |
56 | def get_analysis_result(self, data_to_get):
57 | """
58 | get_analysis_result(self, data_to_get):
59 | Input: data_to_get. The statistic that the function should get from the results dictionary.
60 | Gets the count of either positive, negative or neutral from the results dictionary after
61 | doing an analysis.
62 | Return: The count of positive, negative or positive tweets found during the analysis.
63 | """
64 |
65 | return self.results[data_to_get]
66 |
67 |
68 | def show_most_informative_features( self, amount ):
69 | """
70 | show_most_informative_features( self, amount ):
71 | Input: amount. How many features should the function display.
72 | Displays the most informative features in the classifier used
73 | to classify each tweet.
74 | """
75 |
76 | self.classifier.show_most_informative_features( amount )
77 |
78 |
79 | def __init_naive_bayes(self):
80 | """
81 | __init_naive_bayes(self):
82 | Gets the data from the positive, negative and neutral text files.
83 | Creates and trains the Naive Bayes classifier, using the data, so
84 | that it can learn what constitutes a positive, negative or neutral tweet.
85 | """
86 |
87 | try:
88 | pos_file = pjoin( sys.path[0], "sentiment_word_files", "tweets_positive.txt")
89 | f = codecs.open( pos_file, mode="rU", encoding='utf-8')
90 | positive = [ line.lower().replace("\n" , " ") for line in f ]
91 | positive = "".join(word[:] for word in positive).split()
92 | f.close
93 |
94 | neu_file = pjoin( sys.path[0], "sentiment_word_files", "tweets_neutral.txt")
95 | f = codecs.open( neu_file, mode="rU", encoding='utf-8')
96 | neutral = [ line.lower().replace("\n" , " ") for line in f ]
97 | neutral = "".join(word[:] for word in neutral).split()
98 | f.close
99 |
100 | neg_file = pjoin( sys.path[0], "sentiment_word_files", "tweets_negative.txt")
101 | f = codecs.open( neg_file, mode="rU", encoding='utf-8')
102 | negative = [ line.lower().replace("\n" , " ") for line in f ]
103 | negative = "".join(word[:] for word in negative).split()
104 | f.close
105 |
106 | posfeats = [( dict( { word.lower() : True } ), 'pos' ) for word in positive if self.__check_word( word ) ]
107 | neufeats = [( dict( { word.lower() : True } ), 'neu' ) for word in neutral if self.__check_word( word ) ]
108 | negfeats = [( dict( { word.lower() : True } ), 'neg' ) for word in negative if self.__check_word( word ) ]
109 |
110 | self.classifier = NaiveBayesClassifier.train( posfeats + neufeats + negfeats )
111 |
112 | except:
113 | raise Exception ("Unknown error in SentimentAnalyzer::__init_naive_bayes")
114 |
115 | def __check_word( self, word ):
116 | """
117 | __check_word( self, word ):
118 | Input: word. The word to check.
119 | Looks at a word and determines whether that should be used in the classifier.
120 | Return: True if the word should be used, False if not.
121 | """
122 | if word in self.stopSet \
123 | or len(word) < self.min_word_length \
124 | or word[0] == "@" \
125 | or word[0] == "#" \
126 | or word[:4] == "http":
127 | return False
128 | else:
129 | return True
130 |
131 |
132 |
133 | def __analyze_tweet(self, tweet):
134 | """
135 | __analyze_tweet(self, tweet):
136 | Input: tweet. The tweet that should be analyzed.
137 | Analyses a tweet using the created Naive Bayes classifier.
138 | Return: The results fromt the classifier. Possible results: 'pos', 'neg' or 'neu'
139 | """
140 | try:
141 | tweet_features = dict([ (word, True)
142 | for word in tweet.lower().split()
143 | if self.__check_word( word ) ] )
144 | return self.classifier.classify( tweet_features )
145 |
146 | except:
147 | raise Exception ("Unknown error in SentimentAnalyzer::__analyze_tweet")
148 | return 'err'
149 |
150 |
151 | def __analyse_using_naive_bayes(self, data):
152 | """
153 | __analyse_using_naive_bayes(self, data):
154 | Input: data. A list of tweets to analyze.
155 | Takes a list of tweets and uses sentiment analysis to determine
156 | whether each tweet is positive, negative or neutral.
157 | Return: A list of the tweets analyzed.
158 | """
159 | analyzed_data = {}
160 | try:
161 | for search_term, tweet_data in data.iteritems():
162 | self.results[search_term + "_positive"] = 0
163 | self.results[search_term + "_negative"] = 0
164 | self.results[search_term + "_neutral"] = 0
165 |
166 | search_term_data = []
167 | for data in tweet_data:
168 | temp_data = data
169 | result = self.__analyze_tweet( data[0] )
170 | temp_data.append( result )
171 | search_term_data.append( temp_data )
172 |
173 | if (result == 'pos'): self.results[search_term + "_positive"] += 1
174 | elif (result == 'neg'): self.results[search_term + "_negative"] += 1
175 | elif (result == 'neu'): self.results[search_term + "_neutral"] += 1
176 |
177 | analyzed_data[search_term] = search_term_data
178 | self.results["positive"] += self.results[search_term + "_positive"]
179 | self.results["negative"] += self.results[search_term + "_negative"]
180 | self.results["neutral"] += self.results[search_term + "_neutral"]
181 |
182 | return analyzed_data
183 |
184 | except:
185 | raise Exception ("Unknown error in SentimentAnalyzer::__analyse_using_naive_bayes")
186 | return analyzed_data
187 |
--------------------------------------------------------------------------------
/Code/sentiment_word_files/AFINN-96.txt:
--------------------------------------------------------------------------------
1 | abandon -2
2 | abandons -2
3 | abandoned -2
4 | absentee -1
5 | absentees -1
6 | aboard 1
7 | abducted -2
8 | abduction -2
9 | abductions -2
10 | abuse -3
11 | abused -3
12 | abuses -3
13 | accept 1
14 | accepting 1
15 | accepts 1
16 | accepted 1
17 | accident -2
18 | accidental -2
19 | accidentally -2
20 | accidents -2
21 | accomplish 2
22 | accomplished 2
23 | accomplishes 2
24 | accusation -2
25 | accusations -2
26 | accuse -2
27 | accused -2
28 | ache -2
29 | achievable 1
30 | acquitted 2
31 | admit -1
32 | admits -1
33 | admitted -1
34 | adopt 1
35 | adopts 1
36 | advanced 1
37 | affected -1
38 | afraid -2
39 | aggressive -2
40 | aggression -2
41 | aggressions -2
42 | agree 1
43 | agrees 1
44 | agreed 1
45 | alarm -2
46 | alarmist -2
47 | alarmists -2
48 | alas -1
49 | alert -1
50 | alienation -2
51 | alive 1
52 | allergic -2
53 | allow 1
54 | alone -2
55 | amazed 2
56 | amazing 4
57 | ambitious 2
58 | amuse 3
59 | amused 3
60 | amusement 3
61 | amusements 3
62 | anger -3
63 | angers -3
64 | annoy -2
65 | annoys -2
66 | annoying -2
67 | anti -1
68 | anxious -2
69 | anxiety -2
70 | apocalyptic -2
71 | appalling -2
72 | applauded 2
73 | applaudes 2
74 | applauding 2
75 | applause 2
76 | appreciation 2
77 | approval 2
78 | approved 2
79 | approves 2
80 | apologise -1
81 | apologised -1
82 | apologises -1
83 | apologising -1
84 | apology -1
85 | ardent 1
86 | arrest -2
87 | arrests -2
88 | arrested -3
89 | arrogant -2
90 | ashamed -2
91 | ass -4
92 | assassination -3
93 | assassinations -3
94 | asset 2
95 | assets 2
96 | asshole -4
97 | attack -1
98 | attacked -1
99 | attacking -1
100 | attacks -1
101 | attract 1
102 | attracts 1
103 | attracting 2
104 | attraction 2
105 | attractions 2
106 | avert -1
107 | averted -1
108 | averts -1
109 | avoid -1
110 | avoided -1
111 | avoids -1
112 | await -1
113 | awaited -1
114 | awaits -1
115 | award 3
116 | awarded 3
117 | awards 3
118 | awesome 4
119 | awful -3
120 | axe -1
121 | axed -1
122 | backed 1
123 | backing 2
124 | backs 1
125 | bad -3
126 | badly -3
127 | bailout -2
128 | bamboozle -2
129 | bamboozled -2
130 | bamboozles -2
131 | ban -2
132 | banish -1
133 | bankrupt -3
134 | bankster -3
135 | banned -2
136 | bargain 2
137 | barrier -2
138 | bastard -5
139 | bastards -5
140 | battle -1
141 | battles -1
142 | beating -1
143 | beautiful 3
144 | beloved 3
145 | benefit 2
146 | benefits 2
147 | best 3
148 | betrayal -3
149 | better 2
150 | big 1
151 | bitch -5
152 | bitches -5
153 | bizarre -2
154 | blah -2
155 | blame -2
156 | bless 2
157 | blind -1
158 | bliss 3
159 | block -1
160 | blockbuster 3
161 | blocked -1
162 | blocks -1
163 | blocking -1
164 | bloody -3
165 | bomb -1
166 | boost 1
167 | boosted 1
168 | boosting 1
169 | boosts 1
170 | bored -2
171 | boring -3
172 | bother -2
173 | boycott -2
174 | boycots -2
175 | boycotted -2
176 | boycotting -2
177 | brainwashing -3
178 | brave 2
179 | breathtaking 5
180 | breakthrough 3
181 | bribe -3
182 | brilliant 4
183 | broke -1
184 | broked -1
185 | broken -1
186 | bullshit -4
187 | bullied -2
188 | bully -2
189 | bullying -2
190 | bummer -2
191 | burden -2
192 | calm 2
193 | calmed 2
194 | calming 2
195 | calms 2
196 | cancel -1
197 | cancels -1
198 | cancer -1
199 | can't stand -3
200 | care 2
201 | carefree 1
202 | careful 2
203 | carefully 2
204 | cares 2
205 | catastrophic -4
206 | cashing in -2
207 | casualty -2
208 | celebrate 3
209 | celebrated 3
210 | celebrates 3
211 | celebrating 3
212 | censor -2
213 | censored -2
214 | censors -2
215 | certain 1
216 | challenge -1
217 | charges -2
218 | cheer 2
219 | cheerful 2
220 | cheering 2
221 | cheers 3
222 | cheery 3
223 | chilling -1
224 | clarifies 2
225 | clarity 2
226 | clash -2
227 | clean 2
228 | cleaner 2
229 | clear 1
230 | clears 1
231 | cleared 1
232 | clever 2
233 | chance 2
234 | chances 2
235 | chaos -2
236 | chaotic -2
237 | charged -3
238 | cheat -3
239 | cheater -3
240 | cheaters -3
241 | cheats -3
242 | cheated -3
243 | cheer 2
244 | cheers 2
245 | cheered 2
246 | cherish 2
247 | cherished 2
248 | cherishes 2
249 | cherishing 2
250 | clueless -2
251 | cock -5
252 | cocksucker -5
253 | collapse -2
254 | collapsed -2
255 | collapses -2
256 | collapsing -2
257 | collide -1
258 | collides -1
259 | colliding -1
260 | collision -2
261 | collisions -2
262 | colluding -3
263 | combat -1
264 | combats -1
265 | commend 2
266 | commended 2
267 | commit 1
268 | commitment 2
269 | committed 1
270 | committing 1
271 | commits 1
272 | comprehensive 2
273 | confidence 2
274 | conflict -2
275 | conflicting -2
276 | conflicts -2
277 | confusing -2
278 | confuse -2
279 | confused -2
280 | congrats 2
281 | congratulate 2
282 | congratulation 2
283 | congratulations 2
284 | conspiracy -3
285 | controversial -2
286 | controversially -2
287 | convince 1
288 | convinced 1
289 | convinces 1
290 | cool 1
291 | cool stuff 3
292 | corpse -1
293 | costly -2
294 | courtesy 2
295 | cover-up -3
296 | coziness 2
297 | cramp -1
298 | crap -3
299 | crash -2
300 | crazy -2
301 | creative 2
302 | cried -2
303 | crime -3
304 | criminal -3
305 | criminals -3
306 | crisis -3
307 | critic -2
308 | critics -2
309 | criticize -2
310 | criticized -2
311 | criticizes -2
312 | criticizing -2
313 | cruel -3
314 | cruelty -3
315 | cry -1
316 | crying -2
317 | cunt -5
318 | curse -1
319 | cut -1
320 | cute 2
321 | cuts -1
322 | cutting -1
323 | cynicism -2
324 | damage -3
325 | damages -3
326 | damn -4
327 | damned -4
328 | darkest -2
329 | demonstration -1
330 | danger -2
331 | dead -3
332 | deadlock -2
333 | dear 2
334 | dearly 3
335 | deafening -1
336 | death -2
337 | debt -2
338 | deceive -3
339 | deceived -3
340 | deceives -3
341 | deceiving -3
342 | deception -3
343 | defect -3
344 | defects -3
345 | defender 2
346 | defenders 2
347 | defer -1
348 | defering -1
349 | deficit -2
350 | delay -1
351 | delayed -1
352 | delight 3
353 | delighted 3
354 | denied -2
355 | denier -2
356 | deniers -2
357 | denies -2
358 | denounce -2
359 | denounces -2
360 | deny -2
361 | denying -2
362 | depressed -2
363 | depressing -2
364 | derail -2
365 | derails -2
366 | deride -2
367 | derided -2
368 | derides -2
369 | deriding -2
370 | desire 1
371 | desired 2
372 | derision -2
373 | despair -3
374 | despairs -3
375 | desperate -3
376 | desperately -3
377 | destroy -3
378 | destroys -3
379 | destroyed -3
380 | destruction -3
381 | detain -2
382 | detained -2
383 | detention -2
384 | devastated -2
385 | devastating -2
386 | devoted 3
387 | dick -4
388 | dickhead -4
389 | die -3
390 | died -3
391 | difficult -1
392 | dilemma -1
393 | dire -3
394 | dirt -2
395 | dirty -2
396 | dirtier -2
397 | dirtiest -2
398 | disabling -1
399 | disappear -1
400 | disappears -1
401 | disappeared -1
402 | disappoint -2
403 | disappointed -2
404 | disappointing -2
405 | disappointment -2
406 | disappointments -2
407 | disappoints -2
408 | disaster -2
409 | disasters -2
410 | disastrous -3
411 | discord -2
412 | disgust -3
413 | disgusting -3
414 | dishonest -2
415 | dismayed -2
416 | dispute -2
417 | disputed -2
418 | disputes -2
419 | disputing -2
420 | disrespect -2
421 | disruption -2
422 | disruptions -2
423 | disruptive -2
424 | distort -2
425 | distorted -2
426 | distorting -2
427 | distorts -2
428 | dissy -1
429 | distract -2
430 | distracted -2
431 | distracts -2
432 | distraction -2
433 | distrust -3
434 | dithering -2
435 | dodgy -2
436 | dodging -2
437 | does not work -3
438 | dont like -2
439 | doom -2
440 | doomed -2
441 | doubt -1
442 | doubts -1
443 | downside -2
444 | drag -1
445 | drags -1
446 | dragged -1
447 | dread -2
448 | dream 1
449 | dreams 1
450 | drop -1
451 | drown -2
452 | drowned -2
453 | drowns -2
454 | drunk -2
455 | dubious -2
456 | dud -2
457 | dumb -3
458 | dump -1
459 | dumped -2
460 | dysfunction -2
461 | eager 2
462 | ease 2
463 | eerie -2
464 | eery -2
465 | effective 2
466 | effectively 2
467 | embarrass -2
468 | embarrassed -2
469 | embarrasses -2
470 | embarrassing -2
471 | embrace 1
472 | emergency -2
473 | encourage 2
474 | encourages 2
475 | encouraged 2
476 | endorse 2
477 | endorsed 2
478 | endorses 2
479 | endorsement 2
480 | enemies -2
481 | enemy -2
482 | engage 1
483 | engages 1
484 | enjoy 2
485 | enjoys 2
486 | enjoying 2
487 | enlightening 2
488 | enslave -2
489 | enslaved -2
490 | enslaves -2
491 | ensure 1
492 | ensuring 1
493 | entertaining 2
494 | envies -1
495 | envy -1
496 | envying -1
497 | escate -1
498 | escates -1
499 | escating -1
500 | ethical 2
501 | eviction -1
502 | evil -3
503 | exaggerate -2
504 | exaggerated -2
505 | exaggerates -2
506 | exaggerating -2
507 | excellence 3
508 | excellent 3
509 | excited 3
510 | excitement 3
511 | exciting 3
512 | exclude -1
513 | excluded -2
514 | exclusion -1
515 | exclusive 2
516 | excuse -1
517 | exhausted -2
518 | expand 1
519 | expands 1
520 | expel -2
521 | expels -2
522 | expelled -2
523 | expelling -2
524 | exploit -2
525 | exploited -2
526 | exploits -2
527 | exploiting -2
528 | expose -1
529 | exposed -1
530 | exposes -1
531 | exposing -1
532 | extend 1
533 | extends 1
534 | fabulous 4
535 | facinate 3
536 | facinated 3
537 | facinating 3
538 | fad -2
539 | faggot -3
540 | faggots -3
541 | fail -2
542 | failed -2
543 | fails -2
544 | failing -2
545 | failure -2
546 | faithful 3
547 | fair 2
548 | faith 1
549 | fake -3
550 | fakes -3
551 | faking -3
552 | falling -1
553 | falsify -3
554 | falsified -3
555 | fame 1
556 | fan 3
557 | fantastic 4
558 | farce -1
559 | fascist -2
560 | fascists -2
561 | fatality -3
562 | fatalities -3
563 | favor 2
564 | favors 2
565 | favorite 2
566 | favorites 2
567 | favorited 2
568 | fear -2
569 | fearful -2
570 | fearing -2
571 | fearless 2
572 | fed up -3
573 | feeble -2
574 | feeling 1
575 | feeble -2
576 | felony -3
577 | felonies -3
578 | fiasco -3
579 | fight -1
580 | fine 2
581 | fire -2
582 | fired -2
583 | firing -2
584 | fitness 1
585 | flagship 2
586 | flees -1
587 | flop -2
588 | flops -2
589 | flu -2
590 | fool -2
591 | fools -2
592 | forget -1
593 | forgetful -2
594 | forgotten -1
595 | frantic -1
596 | fraud -4
597 | fraudster -4
598 | fraudsters -4
599 | fraudulent -4
600 | free 1
601 | frenzy -3
602 | fresh 1
603 | friendly 2
604 | frightened -2
605 | frikin -2
606 | frustration -2
607 | ftw 3
608 | fuck -4
609 | fucked -4
610 | fuckers -4
611 | fucking -4
612 | fud -3
613 | fulfill 2
614 | fulfilled 2
615 | fulfills 2
616 | fun 4
617 | funeral -1
618 | funky 2
619 | funny 4
620 | furious -3
621 | hail 2
622 | hailed 2
623 | hell -4
624 | help 2
625 | helping 2
626 | helpless -2
627 | helps 2
628 | hero 2
629 | heroes 2
630 | heroic 3
631 | hunger -2
632 | hurt -2
633 | hurting -2
634 | hurts -2
635 | gag -2
636 | gagged -2
637 | gain 2
638 | gained 2
639 | gaining 2
640 | gains 2
641 | ghost -1
642 | glad 3
643 | gloom -1
644 | glorious 2
645 | god 1
646 | goddamn -3
647 | good 3
648 | grace 1
649 | grand 3
650 | grant 1
651 | granted 1
652 | granting 1
653 | grants 1
654 | grateful 3
655 | grave -2
656 | gray -1
657 | great 3
658 | greater 3
659 | greatest 3
660 | greed -3
661 | green wash -3
662 | green washing -3
663 | greenwash -3
664 | greenwasher -3
665 | greenwashers -3
666 | greenwashing -3
667 | greet 1
668 | greeted 1
669 | greets 1
670 | greeting 1
671 | greetings 2
672 | grey -1
673 | grief -2
674 | gross -2
675 | growing 1
676 | guilt -3
677 | guilty -3
678 | gun -1
679 | hacked -1
680 | happiness 3
681 | happy 3
682 | hard -1
683 | harm -2
684 | harmed -2
685 | harmful -2
686 | harming -2
687 | harms -2
688 | hate -3
689 | haunt -1
690 | haunted -2
691 | haunts -1
692 | haunting 1
693 | havoc -2
694 | healthy 2
695 | heartbroken -3
696 | help 2
697 | highlight 2
698 | hilarious 2
699 | hoax -2
700 | honest 2
701 | hope 2
702 | hopeful 2
703 | hopefully 2
704 | hopeless -2
705 | hopelessness -2
706 | hopes 2
707 | hoping 2
708 | honor 2
709 | honour 2
710 | horrible -3
711 | horrific -3
712 | hostile -2
713 | hug 2
714 | hugs 2
715 | huge 1
716 | huckster -2
717 | humerous 3
718 | humor 3
719 | humour 3
720 | hurrah 5
721 | hunger -2
722 | hysteria -3
723 | growth 2
724 | idiot -3
725 | idiotic -3
726 | ignorance -2
727 | ignore -1
728 | ignores -1
729 | ignored -2
730 | ill -2
731 | illegal -3
732 | illiteracy -2
733 | illness -2
734 | illnesses -2
735 | imperfect -2
736 | importance 2
737 | important 2
738 | impose -1
739 | imposed -1
740 | imposes -1
741 | imposing -1
742 | impotent -2
743 | impress 3
744 | impressed 3
745 | impresses 3
746 | impressive 3
747 | improve 2
748 | improves 2
749 | improved 2
750 | improvement 2
751 | improving 2
752 | inability -2
753 | inaction -2
754 | inadequate -2
755 | incompetence -2
756 | inconvenient -2
757 | increase 1
758 | increased 1
759 | indifferent -2
760 | indignation -2
761 | indoctrinate -2
762 | indoctrinated -2
763 | indoctrinates -2
764 | indoctrinating -2
765 | ineffective -2
766 | ineffectively -2
767 | infringement -2
768 | infuriate -2
769 | infuriates -2
770 | inhibit -1
771 | injury -2
772 | injustice -2
773 | innovate 1
774 | innovates 1
775 | innovation 1
776 | inquisition -2
777 | insane -2
778 | insanity -2
779 | insensitivity -2
780 | insipid -2
781 | inspiration 2
782 | inspirational 2
783 | inspire 2
784 | inspires 2
785 | inspiring 3
786 | intact 2
787 | integrity 2
788 | intense 1
789 | interest 1
790 | interests 1
791 | interested 2
792 | interesting 2
793 | interrupt -2
794 | interrupted -2
795 | interrupts -2
796 | interrupting -2
797 | interruption -2
798 | intimidate -2
799 | intimidated -2
800 | intimidates -2
801 | intimidating -2
802 | inviting 1
803 | irrational -1
804 | irreversible -1
805 | irony -1
806 | ironic -1
807 | jackass -4
808 | jackasses -4
809 | jailed -2
810 | jeopardy -2
811 | jerk -3
812 | jesus 1
813 | join 1
814 | joke 2
815 | joy 3
816 | justice 2
817 | justifiably 2
818 | kill -3
819 | killing -3
820 | kills -3
821 | kind 2
822 | kiss 2
823 | kudos 3
824 | lack -2
825 | lag -1
826 | lagged -2
827 | lagging -2
828 | lags -2
829 | lame -2
830 | landmark 2
831 | laugh 1
832 | laughs 1
833 | laughing 1
834 | launched 1
835 | lawsuit -2
836 | lawsuits -2
837 | leak -1
838 | leaked -1
839 | leave -1
840 | legal 1
841 | legally 1
842 | liar -3
843 | liars -3
844 | libelous -2
845 | lied -2
846 | like 2
847 | likes 2
848 | liked 2
849 | limited -1
850 | limits -1
851 | limitation -1
852 | litigation -1
853 | lively 2
854 | lobby -2
855 | lobbying -2
856 | lol 3
857 | lonely -2
858 | loom -1
859 | loomed -1
860 | looming -1
861 | looms -1
862 | loose -3
863 | looses -3
864 | losing -3
865 | loss -3
866 | lost -3
867 | love 3
868 | lovely 3
869 | lowest -1
870 | luck 3
871 | lunatic -3
872 | lunatics -3
873 | lurk -1
874 | lurks -1
875 | lurking -1
876 | mad -3
877 | made-up -1
878 | madly -3
879 | madness -3
880 | mandatory -1
881 | manipulated -1
882 | manipulating -1
883 | manipulation -1
884 | matter 1
885 | matters 1
886 | meaningful 2
887 | meaningless -2
888 | medal 3
889 | mercy 2
890 | mess -2
891 | messed -2
892 | messing up -2
893 | mindless -2
894 | misery -2
895 | misleading -3
896 | miss -2
897 | mischief -2
898 | mischiefs -2
899 | misinformation -2
900 | misinformed -2
901 | misread -1
902 | misreporting -2
903 | missed -2
904 | mistake -2
905 | mistaken -2
906 | mistakes -2
907 | mistaking -2
908 | mongering -2
909 | monopolizing -2
910 | motherfucker -5
911 | motherfucking -5
912 | murder -2
913 | murderer -2
914 | myth -1
915 | nasty -3
916 | negative -2
917 | neglect -2
918 | neglected -2
919 | neglecting -2
920 | neglects -2
921 | nerves -1
922 | nervous -2
923 | nice 3
924 | nifty 2
925 | nigger -5
926 | no -1
927 | no fun -3
928 | noble 2
929 | nonsense -2
930 | not good -2
931 | novel 2
932 | notorious -2
933 | not working -3
934 | nuts -3
935 | obliterate -2
936 | obliterated -2
937 | obscene -2
938 | offline -1
939 | obsolete -2
940 | obstacle -2
941 | obstacles -2
942 | offend -2
943 | offended -2
944 | offender -2
945 | offending -2
946 | offends -2
947 | oks 2
948 | ominous 3
949 | opportunity 2
950 | opportunities 2
951 | optimism 2
952 | outrage -3
953 | outraged -3
954 | outreach 2
955 | outstanding 5
956 | overload -1
957 | overreact -2
958 | overreacts -2
959 | overreacted -2
960 | oversell -2
961 | overselling -2
962 | oversells -2
963 | oversimplification -2
964 | oversimplified -2
965 | oversimplifies -2
966 | oversimplify -2
967 | overweight -1
968 | oxymoron -1
969 | pain -2
970 | panic -3
971 | paradox -1
972 | parley -1
973 | pathetic -2
974 | pay -1
975 | peace 2
976 | peaceful 2
977 | peacefully 2
978 | penalty -2
979 | perfect 3
980 | perfects 2
981 | perfected 2
982 | perfectly 3
983 | peril -2
984 | perjury -3
985 | perpetrator -2
986 | perpetrators -2
987 | pessimism -2
988 | picturesque 2
989 | piss -4
990 | pissed -4
991 | pity -2
992 | pleasant 3
993 | please 1
994 | pleased 3
995 | poised -2
996 | poison -2
997 | poisoned -2
998 | poisons -2
999 | pollute -2
1000 | pollutes -2
1001 | polluted -2
1002 | polluter -2
1003 | polluters -2
1004 | popular 3
1005 | poor -2
1006 | poorer -2
1007 | poorest -2
1008 | positive 2
1009 | positively 2
1010 | postpone -1
1011 | postponed -1
1012 | postpones -1
1013 | postponing -1
1014 | poverty -1
1015 | praise 3
1016 | praised 3
1017 | prases 3
1018 | praising 3
1019 | pray 1
1020 | praying 1
1021 | prays 1
1022 | prblm -2
1023 | prblms -2
1024 | prepaired 1
1025 | pressure -1
1026 | pretend -1
1027 | pretends -1
1028 | pretending -1
1029 | pretty 1
1030 | prevent -1
1031 | prevented -1
1032 | preventing -1
1033 | prevents -1
1034 | prick -5
1035 | problem -2
1036 | problems -2
1037 | profiteer -2
1038 | progress 2
1039 | promise 1
1040 | promised 1
1041 | promises 1
1042 | promote 1
1043 | promoted 1
1044 | promotes 1
1045 | promoting 1
1046 | propaganda -2
1047 | prosecute -1
1048 | prosecuted -2
1049 | prosecutes -1
1050 | prosecution -1
1051 | prospect 1
1052 | prospects 1
1053 | prosperous 3
1054 | protect 1
1055 | protected 1
1056 | protects 1
1057 | protest -2
1058 | protesters -2
1059 | protests -2
1060 | protesting -2
1061 | proud 2
1062 | proudly 2
1063 | pseudoscience -3
1064 | punish -2
1065 | punishes -2
1066 | punitive -2
1067 | questioned -1
1068 | rainy -1
1069 | rant -3
1070 | rants -3
1071 | ranter -3
1072 | ranters -3
1073 | rape -4
1074 | rash -2
1075 | reach 1
1076 | reaches 1
1077 | reached 1
1078 | reaching 1
1079 | recommend 2
1080 | recommended 2
1081 | recommends 2
1082 | refuse -2
1083 | refused -2
1084 | refusing -2
1085 | regret -2
1086 | reject -1
1087 | rejected -1
1088 | rejects -1
1089 | rejecting -1
1090 | rejoice 4
1091 | rejoiced 4
1092 | rejoices 4
1093 | rejoicing 4
1094 | relaxed 2
1095 | remarkable 2
1096 | rescue 2
1097 | rescued 2
1098 | rescues 2
1099 | resign -1
1100 | resigned -1
1101 | resigning -1
1102 | resigns -1
1103 | resolve 2
1104 | resolved 2
1105 | resolves 2
1106 | resolving 2
1107 | responsible 2
1108 | restless -2
1109 | restore 1
1110 | restored 1
1111 | restoring 1
1112 | restores 1
1113 | restrict -2
1114 | restricted -2
1115 | restricting -2
1116 | restricts -2
1117 | restriction -2
1118 | retained -1
1119 | retarded -2
1120 | revive 2
1121 | revives 2
1122 | reward 2
1123 | rewarded 2
1124 | rewarding 2
1125 | rewards 2
1126 | rich 2
1127 | ridiculous -3
1128 | right direction 3
1129 | rig -1
1130 | rigged -1
1131 | rigorous 3
1132 | rigorously 3
1133 | riot -2
1134 | riots -2
1135 | risk -2
1136 | risks -2
1137 | rob -2
1138 | robed -2
1139 | robs -2
1140 | robing -2
1141 | ruin -2
1142 | ruining -2
1143 | sabotage -2
1144 | sad -2
1145 | sadden -2
1146 | saddenede -2
1147 | sadly -2
1148 | sappy -1
1149 | sarcastic -2
1150 | satisfied 2
1151 | save 2
1152 | saved 2
1153 | scam -2
1154 | scams -2
1155 | scandal -3
1156 | scandalous -3
1157 | scandals -3
1158 | scapegoat -2
1159 | scapegoats -2
1160 | scare -2
1161 | scared -2
1162 | sceptical -2
1163 | sceptics -2
1164 | scoop 3
1165 | screwed -2
1166 | screwed up -3
1167 | secure 2
1168 | secured 2
1169 | secures 2
1170 | seduced -1
1171 | selfish -3
1172 | selfishness -3
1173 | sentence -2
1174 | sentenced -2
1175 | sentencing -2
1176 | sentences -2
1177 | sexy 3
1178 | shaky -2
1179 | shame -2
1180 | shameful -2
1181 | share 1
1182 | shares 1
1183 | shared 1
1184 | shrew -4
1185 | shit -4
1186 | shithead -4
1187 | shitty -3
1188 | shock -2
1189 | shocks -2
1190 | shocked -2
1191 | shocking -2
1192 | shoot -1
1193 | short-sighted -2
1194 | short-sightness -2
1195 | shortage -2
1196 | shortages -2
1197 | shy -1
1198 | sick -2
1199 | sigh -2
1200 | silly -2
1201 | silencing -1
1202 | sinful -3
1203 | singleminded -2
1204 | skeptic -2
1205 | skeptics -2
1206 | skepticism -2
1207 | slam -2
1208 | slash -2
1209 | slashed -2
1210 | slashes -2
1211 | slashing -2
1212 | sleeplessness -2
1213 | slut -5
1214 | smart 1
1215 | smear -2
1216 | smile 2
1217 | smiling 2
1218 | smog -2
1219 | snub -2
1220 | snubs -2
1221 | sobering 1
1222 | solid 2
1223 | solidarity 2
1224 | solution 1
1225 | solutions 1
1226 | solve 1
1227 | solved 1
1228 | solves 1
1229 | solving 1
1230 | some kind 0
1231 | son-of-a-bitch -5
1232 | sore -1
1233 | sorry -1
1234 | spark 1
1235 | sparkle 3
1236 | sparkles 3
1237 | sparkling 3
1238 | spirit 1
1239 | stab -2
1240 | stabbed -2
1241 | stable 2
1242 | stabs -2
1243 | stall -2
1244 | stalled -2
1245 | stalling -2
1246 | starve -2
1247 | starved -2
1248 | starves -2
1249 | starving -2
1250 | steal -2
1251 | steals -2
1252 | stimulate 1
1253 | stimulated 1
1254 | stimulates 1
1255 | stimulating 2
1256 | stolen -2
1257 | stop -1
1258 | stopping -1
1259 | stopped -1
1260 | stops -1
1261 | strangely -1
1262 | strangled -2
1263 | strength 2
1264 | strengthen 2
1265 | strengthening 2
1266 | strengthened 2
1267 | strengthens 2
1268 | strike -1
1269 | strikers -2
1270 | strikes -1
1271 | strong 2
1272 | stronger 2
1273 | strongest 2
1274 | stunning 4
1275 | stupid -2
1276 | success 2
1277 | successful 3
1278 | suffer -2
1279 | suffers -2
1280 | suicide -2
1281 | suing -2
1282 | sulking -2
1283 | sunshine 2
1284 | super 3
1285 | superb 5
1286 | support 2
1287 | supported 2
1288 | supporter 1
1289 | supporters 1
1290 | supportive 2
1291 | supports 2
1292 | survived 2
1293 | surviving 2
1294 | survivor 2
1295 | suspect -1
1296 | suspected -1
1297 | suspecting -1
1298 | suspects -1
1299 | suspend -1
1300 | suspended -1
1301 | stampede -2
1302 | straight 1
1303 | stressor -2
1304 | stressors -2
1305 | strike -2
1306 | substantial 1
1307 | suck -3
1308 | sucks -3
1309 | suffer -2
1310 | suffering -2
1311 | support 1
1312 | supported 1
1313 | supporting 1
1314 | supports 1
1315 | sweet 2
1316 | swift 2
1317 | swiftly 2
1318 | swindle -3
1319 | swindles -3
1320 | swindling -3
1321 | sympathetic 2
1322 | tears -2
1323 | tender 2
1324 | tense -2
1325 | tension -1
1326 | terrible -3
1327 | terribly -3
1328 | terrific 4
1329 | terror -3
1330 | terrorize -3
1331 | terrorized -3
1332 | terrorizes -3
1333 | thank 2
1334 | thanks 2
1335 | thoughtful 2
1336 | thoughtless -2
1337 | threat -2
1338 | threaten -2
1339 | threatens -2
1340 | threating -2
1341 | threats -2
1342 | thrilled 5
1343 | tired -2
1344 | totalitarian -2
1345 | totalitarianism -2
1346 | toothless -2
1347 | top 2
1348 | tops 2
1349 | torture -4
1350 | tortured -4
1351 | tortures -4
1352 | torturing -4
1353 | tout -2
1354 | touts -2
1355 | touted -2
1356 | touting -2
1357 | tragedy -2
1358 | tragic -2
1359 | trap -1
1360 | trauma -3
1361 | traumatic -3
1362 | travesty -2
1363 | treason -3
1364 | trickery -2
1365 | triumph 4
1366 | trouble -2
1367 | troubled -2
1368 | troubles -2
1369 | true 2
1370 | trust 1
1371 | ugly -3
1372 | unacceptable -2
1373 | unapproved -2
1374 | unbelievable -1
1375 | unclear -1
1376 | unconvinced -1
1377 | unconfirmed -1
1378 | undermine -2
1379 | undermines -2
1380 | undermined -2
1381 | undermining -2
1382 | uneasy -2
1383 | unemployment -2
1384 | unethical -2
1385 | unhappy -2
1386 | unimpressed -2
1387 | united 1
1388 | unprofessional -2
1389 | unresearched -2
1390 | unsatisfied -2
1391 | untarnished 2
1392 | upset -2
1393 | upsets -2
1394 | upsetting -2
1395 | urgent -1
1396 | useful 2
1397 | usefulness 2
1398 | useless -2
1399 | uselessness -2
1400 | vested 1
1401 | vulnerable 2
1402 | yeah 1
1403 | yes 1
1404 | yeees 2
1405 | yucky -2
1406 | yummy 3
1407 | vague -2
1408 | verdict -1
1409 | verdicts -1
1410 | victim -3
1411 | victims -3
1412 | violence -3
1413 | violent -3
1414 | virtuous 2
1415 | vision 1
1416 | visionary 3
1417 | visions 1
1418 | visioning 1
1419 | vitality 3
1420 | vitamin 1
1421 | vulnerable -2
1422 | walkout -2
1423 | walkouts -2
1424 | want 1
1425 | war -2
1426 | warfare -2
1427 | warm 1
1428 | warmth 2
1429 | warning -3
1430 | warnings -3
1431 | warn -2
1432 | warned -2
1433 | warning -2
1434 | warns -2
1435 | waste -1
1436 | wasted -2
1437 | wasting -2
1438 | weak -2
1439 | weakness -2
1440 | wealth 3
1441 | wealthy 2
1442 | weep -2
1443 | weeping -2
1444 | weird -2
1445 | welcome 2
1446 | welcomes 2
1447 | whitewash -3
1448 | whore -4
1449 | widowed -1
1450 | willingness 2
1451 | win 4
1452 | winner 4
1453 | wins 4
1454 | winwin 3
1455 | wish 1
1456 | wishes 1
1457 | wishing 1
1458 | withdrawal -3
1459 | won 3
1460 | wonderful 4
1461 | woohoo 3
1462 | woo 3
1463 | wooo 4
1464 | woow 4
1465 | worry -3
1466 | worried -3
1467 | worrying -3
1468 | worse -3
1469 | worsen -3
1470 | worsened -3
1471 | worsening -3
1472 | worsens -3
1473 | worst -3
1474 | worth 2
1475 | wow 4
1476 | wowow 4
1477 | wowww 4
1478 | wrong -2
1479 | zealot -2
1480 | zealots -2
1481 |
--------------------------------------------------------------------------------
/Code/sentiment_word_files/AFINN-README.txt:
--------------------------------------------------------------------------------
1 | AFINN is a list of English words rated for valence with an integer
2 | between minus five (negative) and plus five (positive). The words have
3 | been manually labeled by Finn Årup Nielsen in 2009-2011. The file
4 | is tab-separated. There are two versions:
5 |
6 | AFINN-111: Newest version with 2477 words and phrases.
7 |
8 | AFINN-96: 1468 unique words and phrases on 1480 lines. Note that there
9 | are 1480 lines, as some words are listed twice. The word list in not
10 | entirely in alphabetic ordering.
11 |
12 | An evaluation of the word list is available in:
13 |
14 | Finn Årup Nielsen, "A new ANEW: Evaluation of a word list for
15 | sentiment analysis in microblogs", http://arxiv.org/abs/1103.2903
16 |
17 | The list was used in:
18 |
19 | Lars Kai Hansen, Adam Arvidsson, Finn Årup Nielsen, Elanor Colleoni,
20 | Michael Etter, "Good Friends, Bad News - Affect and Virality in
21 | Twitter", The 2011 International Workshop on Social Computing,
22 | Network, and Services (SocialComNet 2011).
23 |
24 |
25 | This database of words is copyright protected and distributed under
26 | "Open Database License (ODbL) v1.0"
27 | http://www.opendatacommons.org/licenses/odbl/1.0/ or a similar
28 | copyleft license.
29 |
30 | See comments on the word list here:
31 | http://fnielsen.posterous.com/old-anew-a-sentiment-about-sentiment-analysis
32 |
33 |
34 | In Python the file may be read into a dictionary with:
35 |
36 | >>> afinn = dict(map(lambda (k,v): (k,int(v)),
37 | [ line.split('\t') for line in open("AFINN-111.txt") ]))
38 | >>> afinn["Good".lower()]
39 | 3
40 | >>> sum(map(lambda word: afinn.get(word, 0), "Rainy day but still in a good mood".lower().split()))
41 | 2
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Code/sentiment_word_files/Nielsen2009Responsible_emotion.csv:
--------------------------------------------------------------------------------
1 | abandon -2
2 | abandons -2
3 | abandoned -2
4 | absentee -1
5 | absentees -1
6 | aboard 1
7 | abducted -2
8 | abduction -2
9 | abductions -2
10 | abuse -3
11 | abused -3
12 | abuses -3
13 | accept 1
14 | accepting 1
15 | accepts 1
16 | accepted 1
17 | accident -2
18 | accidental -2
19 | accidentally -2
20 | accidents -2
21 | accomplish 2
22 | accomplished 2
23 | accomplishes 2
24 | accusation -2
25 | accusations -2
26 | accuse -2
27 | accused -2
28 | ache -2
29 | achievable 1
30 | acquitted 2
31 | admit -1
32 | admits -1
33 | admitted -1
34 | adopt 1
35 | adopts 1
36 | advanced 1
37 | affected -1
38 | afraid -2
39 | aggressive -2
40 | aggression -2
41 | aggressions -2
42 | agree 1
43 | agrees 1
44 | agreed 1
45 | alarm -2
46 | alarmist -2
47 | alarmists -2
48 | alas -1
49 | alert -1
50 | alienation -2
51 | alive 1
52 | allergic -2
53 | allow 1
54 | alone -2
55 | amazed 2
56 | amazing 4
57 | ambitious 2
58 | amuse 3
59 | amused 3
60 | amusement 3
61 | amusements 3
62 | anger -3
63 | angers -3
64 | annoy -2
65 | annoys -2
66 | annoying -2
67 | anti -1
68 | anxious -2
69 | anxiety -2
70 | apocalyptic -2
71 | appalling -2
72 | applauded -2
73 | applaudes -2
74 | applauding -2
75 | applause -2
76 | appreciation 2
77 | approval 2
78 | approved 2
79 | approves 2
80 | apologise -1
81 | apologised -1
82 | apologises -1
83 | apologising -1
84 | apology -1
85 | ardent 1
86 | arrest -2
87 | arrests -2
88 | arrested -3
89 | arrogant -2
90 | ashamed -2
91 | ass -4
92 | assassination -3
93 | assassinations -3
94 | asshole -4
95 | attack -1
96 | attacked -1
97 | attacking -1
98 | attacks -1
99 | attract 1
100 | attracts 1
101 | attracting 2
102 | attraction 2
103 | attractions 2
104 | avert -1
105 | averted -1
106 | averts -1
107 | avoid -1
108 | avoided -1
109 | avoids -1
110 | await -1
111 | awaited -1
112 | awaits -1
113 | award 3
114 | awarded 3
115 | awards 3
116 | awesome 4
117 | awful -3
118 | axe -1
119 | axed -1
120 | backed 1
121 | backing 2
122 | backs 1
123 | bad -3
124 | badly -3
125 | bailout -2
126 | bamboozle -2
127 | bamboozled -2
128 | bamboozles -2
129 | ban -2
130 | banish -1
131 | bankrupt -3
132 | bankster -3
133 | banned -2
134 | bargain 2
135 | barrier -2
136 | bastard -5
137 | bastards -5
138 | battle -1
139 | battles -1
140 | beating -1
141 | beautiful 3
142 | beloved 3
143 | benefit 2
144 | benefits 2
145 | best 3
146 | betrayal -3
147 | better 2
148 | big 1
149 | bitch -5
150 | bitches -5
151 | bizarre -2
152 | blah -2
153 | blame -2
154 | bless 2
155 | blind -1
156 | bliss 3
157 | block -1
158 | blockbuster 3
159 | blocked -1
160 | blocks -1
161 | blocking -1
162 | bloody -3
163 | bomb -1
164 | boost 1
165 | boosted 1
166 | boosting 1
167 | boosts 1
168 | bored -2
169 | boring -3
170 | bother -2
171 | boycott -2
172 | boycots -2
173 | boycotted -2
174 | boycotting -2
175 | brainwashing -3
176 | brave -2
177 | breathtaking 5
178 | breakthrough 3
179 | bribe -3
180 | brilliant 4
181 | broke -1
182 | broked -1
183 | broken -1
184 | bullshit -4
185 | bullied -2
186 | bully -2
187 | bullying -2
188 | bummer -2
189 | burden -2
190 | calm 2
191 | calmed 2
192 | calming 2
193 | calms 2
194 | cancel -1
195 | cancels -1
196 | cancer -1
197 | can't stand -3
198 | care 2
199 | carefree 1
200 | careful 2
201 | carefully 2
202 | cares 2
203 | catastrophic -4
204 | cashing in -2
205 | celebrate 3
206 | celebrated 3
207 | celebrates 3
208 | celebrating 3
209 | censor -2
210 | censored -2
211 | censors -2
212 | certain 1
213 | challenge -1
214 | charges -2
215 | cheer 2
216 | cheerful 2
217 | cheering 2
218 | cheers 3
219 | cheery 3
220 | chilling -1
221 | clarifies 2
222 | clarity 2
223 | clash -2
224 | clean 2
225 | cleaner 2
226 | clear 1
227 | clears 1
228 | cleared 1
229 | clever 2
230 | chance 2
231 | chances 2
232 | chaos -2
233 | chaotic -2
234 | charged -3
235 | cheat -3
236 | cheater -3
237 | cheaters -3
238 | cheats -3
239 | cheated -3
240 | cheer 2
241 | cheers 2
242 | cheered 2
243 | cherish 2
244 | cherished 2
245 | cherishes 2
246 | cherishing 2
247 | clueless -2
248 | cock -5
249 | collapse -2
250 | collapsed -2
251 | collapses -2
252 | collapsing -2
253 | collide -1
254 | collides -1
255 | colliding -1
256 | collision -2
257 | collisions -2
258 | colluding -3
259 | combat -1
260 | combats -1
261 | commend 2
262 | commended 2
263 | commit 1
264 | commitment 2
265 | committed 1
266 | committing 1
267 | commits 1
268 | comprehensive 2
269 | confidence 2
270 | conflict -2
271 | conflicting -2
272 | conflicts -2
273 | confusing -2
274 | confuse -2
275 | confused -2
276 | congrats 2
277 | congratulate 2
278 | congratulation 2
279 | congratulations 2
280 | conspiracy -3
281 | controversial -2
282 | controversially -2
283 | convince 1
284 | convinced 1
285 | convinces 1
286 | cool 1
287 | cool stuff 3
288 | corpse -1
289 | costly -2
290 | courtesy 2
291 | cover-up -3
292 | coziness 2
293 | cramp -1
294 | crap -3
295 | crash -2
296 | crazy -2
297 | creative 2
298 | cried -2
299 | crime -3
300 | criminal -3
301 | criminals -3
302 | crisis -3
303 | critic -2
304 | critics -2
305 | criticize -2
306 | criticized -2
307 | criticizes -2
308 | criticizing -2
309 | cruel -3
310 | cruelty -3
311 | cry -1
312 | crying -2
313 | cunt -5
314 | curse -1
315 | cut -1
316 | cute 2
317 | cuts -1
318 | cutting -1
319 | cynicism -2
320 | damage -3
321 | damages -3
322 | damn -4
323 | damned -4
324 | darkest -2
325 | demonstration -1
326 | danger -2
327 | dead -3
328 | deadlock -2
329 | dear 2
330 | dearly 3
331 | deafening -1
332 | death -2
333 | debt -2
334 | deceive -3
335 | deceived -3
336 | deceives -3
337 | deceiving -3
338 | deception -3
339 | defect -3
340 | defects -3
341 | defender 2
342 | defenders 2
343 | defer -1
344 | defering -1
345 | delay -1
346 | delayed -1
347 | delight 3
348 | delighted 3
349 | denied -2
350 | denier -2
351 | deniers -2
352 | denies -2
353 | denounce -2
354 | denounces -2
355 | deny -2
356 | denying -2
357 | depressed -2
358 | depressing -2
359 | derail -2
360 | derails -2
361 | deride -2
362 | derided -2
363 | derides -2
364 | deriding -2
365 | desire 1
366 | desired 2
367 | derision -2
368 | despair -3
369 | despairs -3
370 | desperate -3
371 | desperately -3
372 | destroy -3
373 | destroys -3
374 | destroyed -3
375 | destruction -3
376 | detain -2
377 | detained -2
378 | detention -2
379 | devastated -2
380 | devastating -2
381 | devoted 3
382 | die -3
383 | died -3
384 | difficult -1
385 | dilemma -1
386 | dirt -2
387 | dirty -2
388 | dirtier -2
389 | dirtiest -2
390 | disabling -1
391 | disappear -1
392 | disappears -1
393 | disappeared -1
394 | disappoint -2
395 | disappointed -2
396 | disappointing -2
397 | disappointment -2
398 | disappointments -2
399 | disappoints -2
400 | disaster -2
401 | disasters -2
402 | disastrous -3
403 | disgust -3
404 | disgusting -3
405 | dishonest -2
406 | dismayed -2
407 | dispute -2
408 | disputed -2
409 | disputes -2
410 | disputing -2
411 | disrespect -2
412 | disruption -2
413 | disruptions -2
414 | disruptive -2
415 | distort -2
416 | distorted -2
417 | distorting -2
418 | distorts -2
419 | dissy -1
420 | distract -2
421 | distracted -2
422 | distracts -2
423 | distraction -2
424 | distrust -3
425 | dithering -2
426 | dodgy -2
427 | dodging -2
428 | does not work -3
429 | dont like -2
430 | doom -2
431 | doomed -2
432 | doubt -1
433 | doubts -1
434 | downside -2
435 | drag -1
436 | drags -1
437 | dragged -1
438 | dread -2
439 | dream 1
440 | dreams 1
441 | drop -1
442 | drown -2
443 | drowned -2
444 | drowns -2
445 | drunk -2
446 | dubious -2
447 | dud -2
448 | dumb -3
449 | dump -1
450 | dumped -2
451 | dysfunction -2
452 | eager 2
453 | ease 2
454 | eerie -2
455 | eery -2
456 | effective 2
457 | effectively 2
458 | embarrass -2
459 | embarrassed -2
460 | embarrasses -2
461 | embarrassing -2
462 | embrace 1
463 | emergency -2
464 | encourage 2
465 | encourages 2
466 | encouraged 2
467 | endorse 2
468 | endorsed 2
469 | endorses 2
470 | endorsement 2
471 | enemies -2
472 | enemy -2
473 | engage 1
474 | engages 1
475 | enjoy 2
476 | enjoys 2
477 | enjoying 2
478 | enlightening 2
479 | enslave -2
480 | enslaved -2
481 | enslaves -2
482 | ensure 1
483 | ensuring 1
484 | entertaining 2
485 | envies -1
486 | envy -1
487 | envying -1
488 | escate -1
489 | escates -1
490 | escating -1
491 | ethical 2
492 | eviction -1
493 | evil -3
494 | exaggerate -2
495 | exaggerated -2
496 | exaggerates -2
497 | exaggerating -2
498 | excellence 3
499 | excellent 3
500 | excited 3
501 | excitement 3
502 | exciting 3
503 | exclude -1
504 | excluded -2
505 | exclusion -1
506 | exclusive 2
507 | excuse -1
508 | exhausted -2
509 | expand 1
510 | expands 1
511 | expel -2
512 | expels -2
513 | expelled -2
514 | expelling -2
515 | exploit -2
516 | exploited -2
517 | exploits -2
518 | exploiting -2
519 | expose -1
520 | exposed -1
521 | exposes -1
522 | exposing -1
523 | extend 1
524 | extends 1
525 | fabulous 4
526 | facinate 3
527 | facinated 3
528 | facinating 3
529 | fad -2
530 | faggot -3
531 | faggots -3
532 | fail -2
533 | failed -2
534 | fails -2
535 | failing -2
536 | failure -2
537 | faithful 3
538 | fair 2
539 | faith 1
540 | fake -3
541 | fakes -3
542 | faking -3
543 | falling -1
544 | falsify -3
545 | falsified -3
546 | fame 1
547 | fan 3
548 | fantastic 4
549 | farce -1
550 | fascist -2
551 | fascists -2
552 | fatality -3
553 | fatalities -3
554 | favor 2
555 | favors 2
556 | favorite 2
557 | favorites 2
558 | favorited 2
559 | fear -2
560 | fearful -2
561 | fearing -2
562 | fearless 2
563 | fed up -3
564 | feeble -2
565 | feeling 1
566 | feeble -2
567 | felony -3
568 | felonies -3
569 | fiasco -3
570 | fight -1
571 | fine 2
572 | fire -2
573 | fired -2
574 | firing -2
575 | flagship 2
576 | flees -1
577 | flop -2
578 | flops -2
579 | flu -2
580 | fool -2
581 | fools -2
582 | forget -1
583 | forgetful -2
584 | forgotten -1
585 | frantic -1
586 | fraud -4
587 | fraudster -4
588 | fraudsters -4
589 | fraudulent -4
590 | free 1
591 | frenzy -3
592 | fresh 1
593 | friendly 2
594 | frightened -2
595 | frikin -2
596 | frustration -2
597 | ftw 3
598 | fuck -4
599 | fucked -4
600 | fuckers -4
601 | fucking -4
602 | fud -3
603 | fulfill 2
604 | fulfilled 2
605 | fulfills 2
606 | fun 4
607 | funeral -1
608 | funky 2
609 | funny 4
610 | furious -3
611 | hail 2
612 | hailed 2
613 | hell -4
614 | help 2
615 | helping 2
616 | helpless -2
617 | helps 2
618 | hero 2
619 | heroes 2
620 | heroic 3
621 | hunger -2
622 | hurt -2
623 | hurting -2
624 | hurts -2
625 | gag -2
626 | gagged -2
627 | gain 2
628 | gained 2
629 | gaining 2
630 | gains 2
631 | ghost -1
632 | glad 3
633 | gloom -1
634 | glorious 2
635 | god 1
636 | goddamn -3
637 | good 3
638 | grace 1
639 | grand 3
640 | grant 1
641 | granted 1
642 | granting 1
643 | grants 1
644 | grateful 3
645 | grave -2
646 | gray -1
647 | great 3
648 | greater 3
649 | greatest 3
650 | greed -3
651 | green wash -3
652 | green washing -3
653 | greenwash -3
654 | greenwasher -3
655 | greenwashers -3
656 | greenwashing -3
657 | greet 1
658 | greeted 1
659 | greets 1
660 | greeting 1
661 | greetings 2
662 | grey -1
663 | grief -2
664 | gross -2
665 | growing 1
666 | guilt -3
667 | guilty -3
668 | gun -1
669 | hacked -1
670 | happiness 3
671 | happy 3
672 | hard -1
673 | harm -2
674 | harmed -2
675 | harmful -2
676 | harming -2
677 | harms -2
678 | hate -3
679 | haunt -1
680 | haunted -2
681 | haunts -1
682 | haunting 1
683 | havoc -2
684 | healthy 2
685 | heartbroken -3
686 | help 2
687 | highlight 2
688 | hilarious 2
689 | hoax -2
690 | honest 2
691 | hope 2
692 | hopeful 2
693 | hopefully 2
694 | hopeless -2
695 | hopelessness -2
696 | hopes 2
697 | hoping 2
698 | honor 2
699 | honour 2
700 | horrible -3
701 | horrific -3
702 | hostile -2
703 | hug 2
704 | hugs 2
705 | huge 1
706 | huckster -2
707 | humerous 3
708 | humor 3
709 | humour 3
710 | hurrah 5
711 | hunger -2
712 | hysteria -3
713 | growth 2
714 | idiot -3
715 | idiotic -3
716 | ignorance -2
717 | ignore -1
718 | ignores -1
719 | ignored -2
720 | ill -2
721 | illegal -3
722 | illiteracy -2
723 | illness -2
724 | illnesses -2
725 | imperfect -2
726 | importance 2
727 | important 2
728 | impose -1
729 | imposed -1
730 | imposes -1
731 | imposing -1
732 | impotent -2
733 | impress 3
734 | impressed 3
735 | impresses 3
736 | impressive 3
737 | improve 2
738 | improves 2
739 | improved 2
740 | improvement 2
741 | improving 2
742 | inability -2
743 | inaction -2
744 | inadequate -2
745 | incompetence -2
746 | inconvenient -2
747 | increase 1
748 | increased 1
749 | indifferent -2
750 | indignation -2
751 | indoctrinate -2
752 | indoctrinated -2
753 | indoctrinates -2
754 | indoctrinating -2
755 | ineffective -2
756 | ineffectively -2
757 | infringement -2
758 | infuriate -2
759 | infuriates -2
760 | inhibit -1
761 | injury -2
762 | injustice -2
763 | innovate 1
764 | innovates 1
765 | innovation 1
766 | inquisition -2
767 | insane -2
768 | insanity -2
769 | insensitivity -2
770 | insipid -2
771 | inspiration 2
772 | inspirational 2
773 | inspire 2
774 | inspires 2
775 | inspiring 3
776 | intact 2
777 | integrity 2
778 | intense 1
779 | interest 1
780 | interests 1
781 | interested 2
782 | interesting 2
783 | interrupt -2
784 | interrupted -2
785 | interrupts -2
786 | interrupting -2
787 | interruption -2
788 | intimidate -2
789 | intimidated -2
790 | intimidates -2
791 | intimidating -2
792 | inviting 1
793 | irrational -1
794 | irreversible -1
795 | irony -1
796 | ironic -1
797 | jackass -4
798 | jackasses -4
799 | jailed -2
800 | jeopardy -2
801 | jerk -3
802 | jesus 1
803 | join 1
804 | joke 2
805 | joy 3
806 | justice 2
807 | justifiably 2
808 | kill -3
809 | killing -3
810 | kills -3
811 | kind 2
812 | kiss 2
813 | kudos 3
814 | lack -2
815 | lagging -2
816 | lame -2
817 | landmark 2
818 | laugh 1
819 | laughs 1
820 | laughing 1
821 | launched 1
822 | lawsuit -2
823 | lawsuits -2
824 | leak -1
825 | leaked -1
826 | leave -1
827 | legal 1
828 | legally 1
829 | liar -3
830 | liars -3
831 | libelous -2
832 | lied -2
833 | like 2
834 | likes 2
835 | liked 2
836 | limited -1
837 | limits -1
838 | limitation -1
839 | litigation -1
840 | lively 2
841 | lobby -2
842 | lobbying -2
843 | lonely -2
844 | loom -1
845 | loomed -1
846 | looming -1
847 | looms -1
848 | loose -3
849 | looses -3
850 | losing -3
851 | loss -3
852 | lost -3
853 | love 3
854 | lovely 3
855 | lowest -1
856 | luck 3
857 | lunatic -3
858 | lunatics -3
859 | lurk -1
860 | lurks -1
861 | lurking -1
862 | mad -3
863 | made-up -1
864 | madly -3
865 | madness -3
866 | mandatory -1
867 | manipulated -1
868 | manipulating -1
869 | manipulation -1
870 | matter 1
871 | matters 1
872 | meaningful 2
873 | meaningless -2
874 | medal 3
875 | mercy 2
876 | mess -2
877 | messed -2
878 | messing up -2
879 | mindless -2
880 | misery -2
881 | misleading -3
882 | miss -2
883 | mischief -2
884 | mischiefs -2
885 | misinformation -2
886 | misinformed -2
887 | misread -1
888 | misreporting -2
889 | missed -2
890 | mistake -2
891 | mistaken -2
892 | mistakes -2
893 | mistaking -2
894 | mongering -2
895 | monopolizing -2
896 | motherfucker -5
897 | motherfucking -5
898 | murder -2
899 | murderer -2
900 | myth -1
901 | nasty -3
902 | negative -2
903 | nerves -1
904 | nervous -2
905 | nice 3
906 | nifty 2
907 | nigger -5
908 | no -1
909 | no fun -3
910 | noble 2
911 | nonsense -2
912 | not good -2
913 | novel 2
914 | notorious -2
915 | not working -3
916 | nuts -3
917 | obliterate -2
918 | obliterated -2
919 | obscene -2
920 | offline -1
921 | obsolete -2
922 | obstacle -2
923 | obstacles -2
924 | offend -2
925 | offended -2
926 | offender -2
927 | offending -2
928 | offends -2
929 | OKs 2
930 | ominous 3
931 | opportunity 2
932 | opportunities 2
933 | optimism 2
934 | outrage -3
935 | outraged -3
936 | outreach 2
937 | outstanding 5
938 | overload -1
939 | overreact -2
940 | overreacts -2
941 | overreacted -2
942 | oversell -2
943 | overselling -2
944 | oversells -2
945 | oversimplification -2
946 | oversimplified -2
947 | oversimplifies -2
948 | oversimplify -2
949 | overweight -1
950 | oxymoron -1
951 | pain -2
952 | panic -3
953 | paradox -1
954 | parley -1
955 | pathetic -2
956 | pay -1
957 | peace 2
958 | peaceful 2
959 | peacefully 2
960 | penalty -2
961 | perfect 3
962 | perfects 2
963 | perfected 2
964 | perfectly 3
965 | peril -2
966 | perjury -3
967 | perpetrator -2
968 | perpetrators -2
969 | pessimism -2
970 | picturesque 2
971 | piss -4
972 | pissed -4
973 | pity -2
974 | pleasant 3
975 | please 1
976 | pleased 3
977 | poised -2
978 | poison -2
979 | poisoned -2
980 | poisons -2
981 | pollute -2
982 | pollutes -2
983 | polluted -2
984 | polluter -2
985 | polluters -2
986 | popular 3
987 | poor -2
988 | poorer -2
989 | poorest -2
990 | positive 2
991 | positively 2
992 | postpone -1
993 | postponed -1
994 | postpones -1
995 | postponing -1
996 | poverty -1
997 | praise 3
998 | praised 3
999 | prases 3
1000 | praising 3
1001 | pray 1
1002 | praying 1
1003 | prays 1
1004 | prblm -2
1005 | prblms -2
1006 | prepaired 1
1007 | pressure -1
1008 | pretend -1
1009 | pretends -1
1010 | pretending -1
1011 | pretty 1
1012 | prevent -1
1013 | prevented -1
1014 | preventing -1
1015 | prevents -1
1016 | prick -5
1017 | problem -2
1018 | problems -2
1019 | profiteer -2
1020 | progress 2
1021 | promise 1
1022 | promised 1
1023 | promises 1
1024 | promote 1
1025 | promoted 1
1026 | promotes 1
1027 | promoting 1
1028 | propaganda -2
1029 | prosecute -1
1030 | prosecuted -2
1031 | prosecutes -1
1032 | prosecution -1
1033 | prospect 1
1034 | prospects 1
1035 | prosperous 3
1036 | protect 1
1037 | protected 1
1038 | protects 1
1039 | protest -2
1040 | protesters -2
1041 | protests -2
1042 | protesting -2
1043 | proud 2
1044 | proudly 2
1045 | pseudoscience -3
1046 | punish -2
1047 | punishes -2
1048 | punitive -2
1049 | questioned -1
1050 | rainy -1
1051 | rant -3
1052 | rants -3
1053 | ranter -3
1054 | ranters -3
1055 | rape -4
1056 | rash -2
1057 | reach 1
1058 | reaches 1
1059 | reached 1
1060 | reaching 1
1061 | recommend 2
1062 | recommended 2
1063 | recommends 2
1064 | refuse -2
1065 | refused -2
1066 | refusing -2
1067 | regret -2
1068 | reject -1
1069 | rejected -1
1070 | rejects -1
1071 | rejecting -1
1072 | relaxed 2
1073 | remarkable 2
1074 | resign -1
1075 | resigned -1
1076 | resigning -1
1077 | resigns -1
1078 | resolve 2
1079 | resolved 2
1080 | resolves 2
1081 | resolving 2
1082 | responsible 2
1083 | restless -2
1084 | restore 1
1085 | restored 1
1086 | restoring 1
1087 | restores 1
1088 | restrict -2
1089 | restricted -2
1090 | restricting -2
1091 | restricts -2
1092 | restriction -2
1093 | retained -1
1094 | retarded -2
1095 | revive 2
1096 | revives 2
1097 | reward 2
1098 | rewarded 2
1099 | rewarding 2
1100 | rewards 2
1101 | rich 2
1102 | ridiculous -3
1103 | right direction 3
1104 | rig -1
1105 | rigged -1
1106 | rigorous 3
1107 | rigorously 3
1108 | riot -2
1109 | riots -2
1110 | risk -2
1111 | risks -2
1112 | rob -2
1113 | robed -2
1114 | robs -2
1115 | robing -2
1116 | ruin -2
1117 | ruining -2
1118 | sabotage -2
1119 | sad -2
1120 | sadden -2
1121 | saddenede -2
1122 | sadly -2
1123 | sappy -1
1124 | sarcastic -2
1125 | satisfied 2
1126 | save 2
1127 | saved 2
1128 | scam -2
1129 | scams -2
1130 | scandal -3
1131 | scandalous -3
1132 | scandals -3
1133 | scapegoat -2
1134 | scapegoats -2
1135 | scare -2
1136 | scared -2
1137 | sceptical -2
1138 | sceptics -2
1139 | scoop 3
1140 | screwed -2
1141 | screwed up -3
1142 | secure 2
1143 | secured 2
1144 | secures 2
1145 | seduced -1
1146 | selfish -3
1147 | selfishness -3
1148 | sentence -2
1149 | sentenced -2
1150 | sentencing -2
1151 | sentences -2
1152 | shaky -2
1153 | shame -2
1154 | shameful -2
1155 | share 1
1156 | shares 1
1157 | shared 1
1158 | shrew -4
1159 | shit -4
1160 | shitty -3
1161 | shock -2
1162 | shocks -2
1163 | shocked -2
1164 | shocking -2
1165 | shoot -1
1166 | short-sighted -2
1167 | short-sightness -2
1168 | shortage -2
1169 | shortages -2
1170 | shy -1
1171 | sick -2
1172 | sigh -2
1173 | silly -2
1174 | silencing -1
1175 | sinful -3
1176 | singleminded -2
1177 | skeptic -2
1178 | skeptics -2
1179 | skepticism -2
1180 | slam -2
1181 | sleeplessness -2
1182 | slut -5
1183 | smart 1
1184 | smear -2
1185 | smile 2
1186 | smiling 2
1187 | smog -2
1188 | snub -2
1189 | snubs -2
1190 | sobering 1
1191 | solid 2
1192 | solidarity 2
1193 | solution 1
1194 | solutions 1
1195 | solve 1
1196 | solved 1
1197 | solves 1
1198 | solving 1
1199 | some kind 0
1200 | son-of-a-bitch -5
1201 | sore -1
1202 | sorry -1
1203 | spark 1
1204 | sparkle 3
1205 | sparkles 3
1206 | sparkling 3
1207 | stab -2
1208 | stabbed -2
1209 | stable 2
1210 | stabs -2
1211 | stall -2
1212 | stalled -2
1213 | stalling -2
1214 | starve -2
1215 | starved -2
1216 | starves -2
1217 | starving -2
1218 | steal -2
1219 | steals -2
1220 | stimulate 1
1221 | stimulated 1
1222 | stimulates 1
1223 | stimulating 2
1224 | stolen -2
1225 | stop -1
1226 | stopping -1
1227 | stopped -1
1228 | stops -1
1229 | strangely -1
1230 | strangled -2
1231 | strength 2
1232 | strengthen 2
1233 | strengthening 2
1234 | strengthened 2
1235 | strengthens 2
1236 | strong 2
1237 | stronger 2
1238 | strongest 2
1239 | stunning 4
1240 | stupid -2
1241 | success 2
1242 | successful 3
1243 | suffer -2
1244 | suffers -2
1245 | suicide -2
1246 | suing -2
1247 | sulking -2
1248 | sunshine 2
1249 | super 3
1250 | superb 5
1251 | support 2
1252 | supporter 1
1253 | supporters 1
1254 | supportive 2
1255 | survived 2
1256 | surviving 2
1257 | survivor 2
1258 | suspended -1
1259 | stampede -2
1260 | straight 1
1261 | stressor -2
1262 | stressors -2
1263 | strike -2
1264 | substantial 1
1265 | suck -3
1266 | sucks -3
1267 | suffer -2
1268 | suffering -2
1269 | support 1
1270 | supported 1
1271 | supporting 1
1272 | supports 1
1273 | sweet 2
1274 | swift 2
1275 | swiftly 2
1276 | swindle -3
1277 | swindles -3
1278 | swindling -3
1279 | sympathetic 2
1280 | tears -2
1281 | tender 2
1282 | tense -2
1283 | tension -1
1284 | terrible -3
1285 | terrific 4
1286 | terror -3
1287 | thank 2
1288 | thanks 2
1289 | thoughtful 2
1290 | thoughtless -2
1291 | threat -2
1292 | threaten -2
1293 | threatens -2
1294 | threating -2
1295 | threats -2
1296 | thrilled 5
1297 | tired -2
1298 | totalitarian -2
1299 | totalitarianism -2
1300 | toothless -2
1301 | top 2
1302 | tops 2
1303 | torture -4
1304 | tortured -4
1305 | tortures -4
1306 | torturing -4
1307 | tout -2
1308 | touts -2
1309 | touted -2
1310 | touting -2
1311 | tragedy -2
1312 | tragic -2
1313 | trap -1
1314 | trauma -3
1315 | traumatic -3
1316 | travesty -2
1317 | treason -3
1318 | trickery -2
1319 | triumph 4
1320 | trouble -2
1321 | troubled -2
1322 | true 2
1323 | trust 1
1324 | ugly -3
1325 | unacceptable -2
1326 | unapproved -2
1327 | unbelievable -1
1328 | unclear -1
1329 | unconvinced -1
1330 | unconfirmed -1
1331 | undermine -2
1332 | undermines -2
1333 | undermined -2
1334 | undermining -2
1335 | uneasy -2
1336 | unemployment -2
1337 | unethical -2
1338 | unhappy -2
1339 | unimpressed -2
1340 | united 1
1341 | unprofessional -2
1342 | unresearched -2
1343 | unsatisfied -2
1344 | untarnished 2
1345 | upset -2
1346 | upsets -2
1347 | upsetting -2
1348 | urgent -1
1349 | useful 2
1350 | usefulness 2
1351 | useless -2
1352 | uselessness -2
1353 | vested 1
1354 | vulnerable 2
1355 | yeah 1
1356 | yes 1
1357 | yeees 2
1358 | yucky -2
1359 | yummy 3
1360 | vague -2
1361 | verdict -1
1362 | verdicts -1
1363 | victim -3
1364 | victims -3
1365 | violence -3
1366 | violent -3
1367 | virtuous 2
1368 | vision 1
1369 | visionary 3
1370 | visions 1
1371 | visioning 1
1372 | vitality 3
1373 | vitamin 1
1374 | vulnerable -2
1375 | walkout -2
1376 | walkouts -2
1377 | want 1
1378 | war -2
1379 | warfare -2
1380 | warm 1
1381 | warmth 2
1382 | warning -3
1383 | warnings -3
1384 | warn -2
1385 | warned -2
1386 | warning -2
1387 | warns -2
1388 | waste -1
1389 | wasted -2
1390 | wasting -2
1391 | weak -2
1392 | weakness -2
1393 | wealth 3
1394 | wealthy 2
1395 | weep -2
1396 | weeping -2
1397 | weird -2
1398 | welcome 2
1399 | welcomes 2
1400 | whitewash -3
1401 | whore -4
1402 | widowed -1
1403 | willingness 2
1404 | win 4
1405 | winner 4
1406 | wins 4
1407 | winwin 3
1408 | wish 1
1409 | wishes 1
1410 | wishing 1
1411 | withdrawal -3
1412 | won 3
1413 | wonderful 4
1414 | woohoo 3
1415 | woo 3
1416 | wooo 4
1417 | woow 4
1418 | worry -3
1419 | worried -3
1420 | worrying -3
1421 | worse -3
1422 | worsen -3
1423 | worsened -3
1424 | worsening -3
1425 | worsens -3
1426 | worst -3
1427 | worth 2
1428 | wow 4
1429 | wowow 4
1430 | wowww 4
1431 | wrong -2
1432 | zealot -2
1433 | zealots -2
1434 |
--------------------------------------------------------------------------------
/Code/sentiment_word_files/Nielsen2010Responsible_english.csv:
--------------------------------------------------------------------------------
1 | a 1
2 | about 3
3 | abre -3
4 | after 3
5 | again 3
6 | agree 3
7 | aime -3
8 | aja -3
9 | akii -3
10 | aku -3
11 | al -1
12 | all 2
13 | ama -3
14 | amazing 3
15 | amiga -3
16 | amigo -1
17 | an 1
18 | and 2
19 | andere -3
20 | animal 3
21 | anlad -3
22 | apa -3
23 | aplicando -3
24 | appear 3
25 | appears 3
26 | aqui -3
27 | are 2
28 | argen -3
29 | as 1
30 | at 1
31 | aussi -3
32 | awaking 3
33 | away 3
34 | ayse -3
35 | azt -3
36 | ba -2
37 | baby 2
38 | back 3
39 | bak -3
40 | bakal -3
41 | bath 3
42 | batin -3
43 | be 1
44 | beach 3
45 | been 3
46 | beijo -3
47 | beer 2
48 | belom -3
49 | best 3
50 | better 3
51 | bienvenida -3
52 | bikin -3
53 | bir -3
54 | bisa -3
55 | bitte -3
56 | boas -3
57 | bok -3
58 | btw 1
59 | bu -2
60 | buenos -3
61 | bukan -3
62 | bunga -3
63 | burning 3
64 | but 1
65 | buy 2
66 | by 2
67 | c'est -3
68 | ca -2
69 | can 1
70 | casa -3
71 | christmas 3
72 | cilok -3
73 | class 3
74 | clean 3
75 | coba -3
76 | com 0
77 | come 3
78 | coming 3
79 | completely 3
80 | como -3
81 | confundo -3
82 | contar -3
83 | creo -3
84 | cuando -3
85 | curti -3
86 | cut 2
87 | da -1
88 | damn 2
89 | da -2
90 | dan 3
91 | dann -3
92 | dari -3
93 | dating 2
94 | day 2
95 | de -2
96 | deh -3
97 | dekem -3
98 | demir -3
99 | desde -3
100 | di -2
101 | dia -1
102 | dias -3
103 | días -3
104 | did 3
105 | diga -3
106 | dileta -3
107 | dinner 3
108 | do 0
109 | doesn't 3
110 | doing 3
111 | don't 3
112 | donde -3
113 | dont 2
114 | drinking 3
115 | dun -3
116 | e -1
117 | é -2
118 | east 3
119 | easy 3
120 | een -3
121 | ein -3
122 | eita -3
123 | el -2
124 | elam -3
125 | emails 2
126 | en -2
127 | english 3
128 | enjoyed 3
129 | entenda -3
130 | entrar -3
131 | ersten -3
132 | es -3
133 | esok -3
134 | esa -3
135 | essa -3
136 | esse -3
137 | essen -2
138 | estão -3
139 | estão -3
140 | estos -3
141 | eu -1
142 | even 3
143 | everyone 3
144 | everytime 3
145 | ewang -3
146 | exija -3
147 | fait -3
148 | fale -3
149 | family 3
150 | farewell 3
151 | fases -3
152 | fashion 2
153 | faz -3
154 | feel 3
155 | fica -3
156 | filled 3
157 | fim -3
158 | fin -3
159 | finish 3
160 | finished 3
161 | first 3
162 | foi -3
163 | follow 2
164 | for 1
165 | from 3
166 | full 3
167 | gak -3
168 | ganas -3
169 | genau -3
170 | gente -3
171 | get 3
172 | gets 3
173 | girl 3
174 | girls 3
175 | gleich -3
176 | go 1
177 | goes 3
178 | going 3
179 | gonna 3
180 | good 3
181 | goodnight 3
182 | gordum -3
183 | got 2
184 | gotta 3
185 | gracias -3
186 | great 3
187 | gritando -3
188 | gue -3
189 | gun -3
190 | had 2
191 | haha 0
192 | hahaha 0
193 | hair 3
194 | hao -3
195 | happy 3
196 | hari -3
197 | hasta -2
198 | have 2
199 | hay -3
200 | haya -3
201 | he 1
202 | heart 3
203 | hein -3
204 | her 2
205 | heute -3
206 | his 2
207 | hoje -3
208 | hola -2
209 | hoort -3
210 | hope 3
211 | how 3
212 | i 1
213 | i'm 2
214 | ich -3
215 | if 1
216 | ik -3
217 | ikut -3
218 | il -3
219 | imi -3
220 | in 1
221 | ini -2
222 | is 1
223 | isso -3
224 | ist -3
225 | it 2
226 | it's 3
227 | ita -3
228 | its 3
229 | itu -3
230 | ja -2
231 | je -3
232 | jepe -3
233 | jij -3
234 | job 1
235 | juara -3
236 | just 3
237 | kak -3
238 | kalee -3
239 | kali -3
240 | kalo -3
241 | kamu -3
242 | kan -3
243 | ke -3
244 | keeps 3
245 | kid 2
246 | kiss 3
247 | klo -3
248 | know 3
249 | kok -3
250 | komt -3
251 | ku -3
252 | kusut -3
253 | la -1
254 | lagi -3
255 | laki -3
256 | lar -3
257 | las -3
258 | last 3
259 | latest 3
260 | left 3
261 | libero -3
262 | life 3
263 | like 3
264 | lil 0
265 | lindo -3
266 | link 1
267 | little 3
268 | live 2
269 | lol 0
270 | long 2
271 | look 2
272 | looks 3
273 | los -3
274 | love 2
275 | lovely 3
276 | lu -3
277 | luput -3
278 | low 2
279 | maar -3
280 | made 2
281 | mah -3
282 | maior -3
283 | mais -3
284 | make 3
285 | makaish -3
286 | makan -3
287 | makin -3
288 | making 3
289 | mal -3
290 | malam -3
291 | malem -3
292 | man -1
293 | manis -3
294 | mano -3
295 | marga -3
296 | market 3
297 | mas -3
298 | masi -3
299 | masih -3
300 | matter 3
301 | mau -3
302 | me 1
303 | mean 3
304 | means 3
305 | mecim -3
306 | meines -3
307 | mero -3
308 | merry 2
309 | mert -3
310 | mesmo -3
311 | meeting 3
312 | meu -3
313 | meus -3
314 | mi -2
315 | might 3
316 | mimir -3
317 | minal -3
318 | mir -3
319 | mischievous 3
320 | miss 1
321 | mistake 3
322 | mohon -3
323 | month 3
324 | monto -3
325 | more 2
326 | morning 3
327 | morri -3
328 | morta -3
329 | moving 3
330 | mucho -3
331 | muitas -3
332 | muito -3
333 | mulai -3
334 | my 1
335 | na -2
336 | nach -3
337 | name 3
338 | nao -3
339 | não -3
340 | nee -2
341 | nem -3
342 | nene -3
343 | nessa -3
344 | new 3
345 | news 2
346 | ni -2
347 | nicht -3
348 | no 0
349 | nock -3
350 | nossa -3
351 | not 2
352 | notice 3
353 | nova -2
354 | novidade -3
355 | now 3
356 | nunca -3
357 | o -1
358 | ofzo -3
359 | oi -2
360 | obrigada -3
361 | of 2
362 | okay 1
363 | old 3
364 | om -2
365 | on 1
366 | one 2
367 | ones 3
368 | only 3
369 | ook -3
370 | open 2
371 | or 1
372 | orang -3
373 | ou -3
374 | oui -3
375 | our 3
376 | out 3
377 | over 1
378 | pada -3
379 | pake -3
380 | pala -3
381 | palak -3
382 | palem -3
383 | para -3
384 | payah -3
385 | pelo -3
386 | pengen -3
387 | picture 3
388 | pictures 3
389 | pintu -3
390 | pitten -3
391 | plak -3
392 | planet 1
393 | plate 3
394 | please 3
395 | pois -3
396 | por -3
397 | porque -3
398 | ppl 1
399 | pra -3
400 | present 3
401 | puedo -3
402 | que -1
403 | quem -3
404 | quero -3
405 | ready 3
406 | really 3
407 | refuse -3
408 | right 3
409 | rights 3
410 | road 3
411 | roupa -3
412 | rude 3
413 | sabar -3
414 | safe 3
415 | sama -3
416 | saturday 3
417 | satu -3
418 | saur -3
419 | say 3
420 | saya -3
421 | school 3
422 | score 1
423 | se -1
424 | segem -3
425 | segue -3
426 | sendo -3
427 | sengat -3
428 | ser -3
429 | serio -3
430 | seu -3
431 | seven 3
432 | sexo -3
433 | she 2
434 | shit 2
435 | shut 3
436 | si -3
437 | simples -3
438 | siente -3
439 | sin -3
440 | sino -3
441 | size 3
442 | show 3
443 | smooth 3
444 | so 1
445 | só -3
446 | solto -3
447 | some 2
448 | somebody 3
449 | sometimes 3
450 | sono -3
451 | sorry 3
452 | staat -3
453 | state 2
454 | still 3
455 | such 3
456 | supero -3
457 | sure 3
458 | tak -3
459 | ta -2
460 | taken 3
461 | tan -2
462 | tao -1
463 | tapi -3
464 | tar -3
465 | tarde -3
466 | tau -2
467 | tava -3
468 | tayo -3
469 | teacher 3
470 | te -1
471 | tedio -3
472 | telak -3
473 | tem -3
474 | tengo -3
475 | teu -3
476 | than 3
477 | thank 3
478 | thanks 3
479 | that 3
480 | that's 3
481 | the 2
482 | then 3
483 | they 3
484 | there 3
485 | thing 3
486 | things 3
487 | think 3
488 | this 3
489 | thought 3
490 | thus 3
491 | tiempo -3
492 | time 1
493 | tinha -3
494 | tirar -3
495 | to 1
496 | today 3
497 | todos -2
498 | too 2
499 | tout -3
500 | travel 3
501 | true 3
502 | try 2
503 | trying 3
504 | tu -3
505 | tua -3
506 | tudo -3
507 | two 3
508 | u 0
509 | uda -3
510 | udah -3
511 | ular -3
512 | um -2
513 | uma -3
514 | umas -3
515 | un -1
516 | una -3
517 | und -3
518 | uns -3
519 | up 1
520 | ur 0
521 | US 1
522 | va -2
523 | vas -3
524 | veja -3
525 | vendo -3
526 | verde -3
527 | verdade -3
528 | very 3
529 | vida -3
530 | virão -3
531 | visited 3
532 | viva -3
533 | vo -3
534 | volto -3
535 | voor -3
536 | voce -3
537 | você -3
538 | volta -3
539 | vou -3
540 | wait -3
541 | walk 3
542 | want 3
543 | was 2
544 | we 1
545 | weer -3
546 | welcome 3
547 | well 2
548 | what 3
549 | when 3
550 | which 3
551 | while 3
552 | who 2
553 | why 2
554 | wie -3
555 | wieder -3
556 | will 3
557 | with 3
558 | work 3
559 | would 3
560 | y -1
561 | yar -2
562 | ye -2
563 | yes 3
564 | yo -2
565 | you 3
566 | your 3
567 | ze -3
568 | zur -3
--------------------------------------------------------------------------------
/Code/sentiment_word_files/tweets_negative.txt:
--------------------------------------------------------------------------------
1 | the center of midfield wasn't great
2 | The number of passes made which reached a player tonight Embarrassing
3 | is a dirty Scouse bastard Can we look at that instead of wanking on about the penalty
4 | you dirty little man
5 | kicks the shit out of
6 | could indecently assault an elderly lady at old trafford and still nothing will be made of it
7 | Jammy bastards talk about luck deserting again eh The ref biased a dirty bastard too
8 | is a scouse cheating twat in every possible way
9 | How has not been sent off The ball was long gone
10 | How is even still on the field for He's been utter shite Can only seem to pass to a opposing player
11 | Is really a footballer
12 | is a waste period
13 | produce countless unforced errors
14 | you bellend Offside
15 | Finishing needs work Especially
16 | bad performance in this first half
17 | Did nothing except scoring
18 | I think has issues probably with his girlfriend or something He lacks concentration on the pitch Awful performance today
19 | Very strange performance from The things he was bad at passing control he's done well His best asset (finishing) atrocious
20 | all wasteful
21 | Poor performance were all underwhelming for most of the game Esp
22 | is having a fucking nightmare all he needs is a red card to top off his performance
23 | blatantly kicked
24 | Poor performance from united miss big time Lacking a leader
25 | overall were poor can't see them going far on that performance badly missed
26 | bad performance from united in 1st half I hope be better in 2nd half what happened
27 | is such a stupid ass why not play earlier & take out He can even 10 men IS A FOOL
28 | Crazy Penalty Awarded
29 | He dived
30 | Referee in the game had an absolute mare
31 | He was horrible
32 | He's doubtful
33 | Been revealed that he is Doubtful For Saturday
34 | They have a lot of average players
35 | Far too much dead wood
36 | We have a predictable midfield
37 | We don't use the ball both well enough or quick enough
38 | I think he is one who is not good enough
39 | he's a rare breed of useless
40 | It's sad
41 | It's sad but I can't see any of the young players from today who will make it
42 | The problem is we picked so many average players to start today
43 | His flicks and passes were useless
44 | It was a fairly unexciting debut
45 | Bit disappointed with him tonight if I'm honest
46 | I think he was given shit instructions
47 | He is shit
48 | It was one of those poor overall team performances
49 | His inability
50 | That is ludicrous
51 | didn't have a good game
52 | He didn't do what he was told
53 | poor game from him too much pressure on the lad to perform not ready
54 | we have too many average midfielders
55 | agree we flopped at Euro's but players must shoulder some blame amongst others were so bad was let down
56 | there wasn't a leader
57 | I disagree He is not a top player
58 | Too many players aren't good enough
59 | that was slightly annoying about tonight
60 | it doesn't make any sense
61 | Unfortunately
62 | He struggles to beat his man
63 | His crossing of late has been dreadful as well
64 | Tonight's showing was abysmal
65 | if it is lack of motivation
66 | we lack creativity in the middle
67 | not really that good enough
68 | which is a shame
69 | has impacted massively on our peformances
70 | This is a disappointing time for us
71 | Such a lack of determination
72 | He did everything wrong today
73 | You taking the piss or are you actually that simple
74 | Fuck off you arrogant prick
75 | but he was quite frankly shit
76 | his final ball at times was very poor
77 | He must take a bit of a blame
78 | Two poor games in a row
79 | He was poor hasn't delivered in a few months now
80 | Seemed to lack the intensity
81 | that miss is awful
82 | he was frustrating
83 | I really don't like these slumps of form
84 | there is a lot of inexperience of our right-backs
85 | He is much slower
86 | He has lost much pace
87 | his pace is gone
88 | Horrible injury
89 | we have had so many injuries
90 | that injury was horrible
91 | abysmal injury record
92 | pretty dull game
93 | I am so bored
94 | this game is so boring
95 | we've played some poor football
96 | a very stupid thing to do
97 | lacked creativity
98 | He went through the injuries
99 | he isn't sharp enough
100 | missed almost an entire season with a serious long-term illness
101 | Part of the problem
102 | He was a coward
103 | The assistant's in the game are shit
104 | Basically the ref bottled it today
105 | unable to play
106 | Many of us lack a proper understanding of football
107 | clouded some of our judgement
108 | We do have a few absolute ballbags in our ranks
109 | The level of negativity here has been astounding
110 | Spoilt beyond belief
111 | doom and gloom feckers after a couple of shitty results
112 | a few are spoilt by success
113 | fat Geordie bastard
114 | fans who booed their team off
115 | little enjoyment from the game
116 | we have a few spoilt pricks
117 | The atmosphere is appalling sometimes
118 | Definitely a lot of spoiled twats on here
119 | My main issue is with arrogant spoilt ungrateful fans
120 | playing shite
121 | they are as spoilt as us
122 | continuously booed their team off
123 | for falling short
124 | My gripe was with spoilt and unrealistic people
125 | who leave before the end are the worst
126 | talking bollocks as usual
127 | A bit of knee jerking going on
128 | It's sort of ruining it for me
129 | are generally deluded to fuck
130 | I was disappointed and frustrated too
131 | You pathetic sad twat
132 | A lot of us are complaining
133 | We have as big a percentage of tossers
134 | was a bit sloppy
135 | Below par
136 | for this negativity but fuck it
137 | The negativity here is stupid and retarded granted it was a poor performance
138 | That was the worst performance result in the
139 | probably even worse
140 | His form this season has been fairly worrying
141 | I was angry
142 | He was dire as well
143 | he is fucking apologising
144 | completely unbalanced side
145 | was really disappointing
146 | that was dire
147 | seem to have a slump
148 | it's annoying to lose
149 | the doom merchants are out in force
150 | absolute abortion of a team
151 | He is shit
152 | Awful month
153 | Awful week
154 | Awful game
155 | team has played poorly
156 | And it has been a rather poor week for the club
157 | frankly an embarassment
158 | WUM
159 | having an awful season
160 | missing a sitter
161 | missed a sitter
162 | worst mistake i've seen him make
163 | lack of reaction was terrible
164 | he has a big weakness
165 | worst individual performance
166 | had a fucking mare
167 | that was a terrible decision
168 | Players elbowing others and no cards given
169 | facepalm
170 | Shit decision
171 | Bollocks
172 | he has grown Tiresome
173 | ridiculous stuff
174 | He got at least one of the calls wrong
175 | Gets away with absolutely everything
176 | What an absolute joke of a decision
177 | he robs us
178 | He's so fucking consistently shit It's actually mind boggling
179 | mind boggling
180 | Idiot of a ref
181 | he gets demoted
182 | Hate the man with a passion Thoroughly incompetent
183 | one of the worst refereeing performances I've ever seen
184 | It genuinely bemuses me
185 | this shit will continue
186 | The fuckers should be forced
187 | if they can't then get demoted to lower leagues
188 | becoming a parody of a ref
189 | He is so bad I actually remember him being a terrible referee
190 | has made the officiating worse
191 | bad decision
192 | He's incompetent and inconsistent
193 | one of those players who is just so despicable
194 | and I hated it
195 | Pathetic
196 | is a huge twat
197 | that's a despicable reaction
198 | Pathetic stuff from
199 | is a fucking tool
200 | I fucking hate
201 | Pathetic from the interviewer as well
202 | ruined again
203 | what a fucking cheat
204 | It's shocking stuff
205 | typical cheating
206 | what an utter cnut
207 | You know what's even worse
208 | and seen this terrible decision
209 | Fuck off you fool twat
210 | He should fuck off
211 | such a joke twat
212 | terrible decisions
213 | It killed the game
214 | buzzkill
215 | this has killed the game
216 | joke fool fucking asshole
217 | whinging diving cheat
218 | dives diving
219 | is tragic
220 | Don't recall ever behaving like a bad-tempered little brat Why he's not suspended
221 | He is absolute dogshit
222 | is beyond me
223 | He was demoted
224 | was among the worst i've seen
225 | He's a poor referee
226 | That incompetent twat
227 | struggling offensively looks clueless at times make too many mistakes bad passes
228 | I was rather shocked
229 | his fault
230 | He's just a very bad referee
231 | incompetent people
232 | IMO it was shocking
233 | Far more annoying
234 | He's having a run of poor form
235 | He has the wrong attitude
236 | Slightly overrated
237 | When he's bad he can be bad
238 | he wasnt as good as
239 | fat useless scouse twat
240 | his injury
241 | Now bad is shocking+ we have no cm
242 | that bastard is horrible
243 | He's been below his best
244 | had bad injury problems
245 | terrible injury
246 | this is part of his problem
247 | constantly moaning and threatening to leave
248 | does everything wrong
249 | shower of shites
250 | thought he was poor today
251 | a bit frustrating
252 | he's angry and pissed
253 | Shit first touch
254 | his crossing is terrible
255 | him starting is a bad sign
256 | I can't believe he's starting he is terrible
257 | We lose games when he is in the starting lineup
258 | bad season for him
259 | bad he was really bad
260 | such a bad season
261 | his crossing is so bad
262 | his crossing has deteriorated
263 | he is a horrible player
264 | bad player bad attitude
265 | why has his crossing been so bad
266 | money grabbing prostitue shagging fat scouse cunt
267 | absurd suggestion
268 | just awful
269 | I don't think is world class
270 | Sure hope doesn't mess up
271 | IMO the team is playing horribly at the moment
272 | this is the last time he should play for us
273 | he's been terrible in the last couple of games
274 | fuck off you arrogant fucking bastard
275 | Starting XI for Cunt Cunt Cunt Cunt Cunt Cunt Cunt Cunt Cunt Fat Cunt Cuntarito Ref
276 | that bastard can't do anything right
277 | has suffered suspected ankle ligament damage
278 | Bad news for has suffered suspected ankle ligament damage
279 | horrible news for us
280 | I hate those kind of news magnificent
281 | latest news confirms his injury
282 | those news suck
283 | that damage is horrible
284 | so much damage been done recently
285 | dive was even worse than yesterday That's how bad it was
286 | not happy with the refs today
287 | That's rubbish
288 | So much negativity Football would be a tad boring
289 | What a shitty draw
290 | All I know is that he doesn't know shit about football
291 | torn ligaments in his ankle and will be out for three to four weeks Doesn't sound so bad
292 | Striker problems already at
293 | That's bad news for the kids
294 | Knowing are going to win the league is bad but knowing they'll knock us out of the FA cup is worse
295 | too bad he twisted his ankles
296 | should look to retire in my opinion He is slower than ever and making mistakes weekly it seems
297 | I hate when it takes them so long to make the draw in the FA Cup
298 | I haven't got a clue why he uses him he is useless
299 | we're fucked in the league arrogant bastards
300 | not happy with that you all are fools
301 | kept the ball too long too bad
302 | must be very furious with FA cup draw
303 | no one gives a shit about u muppet
304 | one of the most shitty results ever we're shit
305 | why do we always get the tough draws
306 | small club mentality that
307 | he's garbage hope he doesn't start
308 | what was he thinking when he picked this side to face them
309 | I'm sure he will fuck up somehow shit player
310 | this has been the most shit performance in the league with this lineup don't know what happened
311 | very tough game for us don't see us winning this one
312 | I thought he was very poor today
313 | I hate his fucking face
314 | times are bad for us these days you're right about that
315 | He is old useless and shit he should retire
316 | totally ineffective players aren't just tidy
317 | Shame not starting
318 | Could he be more shit
319 | manager shit players shit team shit stadium shit referee shit every one was shit
320 | he is too young and had an awful time
321 | have failed to score for 485 minutes in all competitons
322 | worst player in the world
323 | Why would anyone sign that shit of a player
324 | That 6-1 defeat is a rare occurence It wont be that open the next time we meet them you're a fool if you think City will annihilate
325 | You know what's worse? If #MUFC fail to beat they could end up playing on thursdays
326 | horrible miss how did he miss that
327 | he never fucking scores
--------------------------------------------------------------------------------
/Code/sentiment_word_files/tweets_neutral.txt:
--------------------------------------------------------------------------------
1 | confirmed line-up
2 | starting lineup
3 | Starting XI
4 | ratings
5 | team news from
6 | I don't know what damage it has done
7 | it has been long
8 | I suppose this isn't the time to say is from my home town
9 | Oh Wesley what you playing at there fella
10 | Don't watch the ball just stop the man
11 | Serie A and La Liga have 5 games with staggered start times from noon to about 8pm
12 | I just realised I have no idea what
13 | who would have thought
14 | Can you link me when it's up About to leave the house
15 | will face cross town rivals
16 | that's not shit
17 | he has faced problems
18 | who knows
19 | I don't know what to think
20 | who did what there
21 | what just happened there
22 | I haven't seen that before
23 | if you didn't come up against the odd tough team
24 | I am watching football today
25 | the draw was today in the FA cup
26 | champions league draw is today
27 | I hope we're up for it
28 | is it bad or good
29 | really wants to win the
30 | Just got home from town Immediately turned the telly on for
31 | follow back
32 | relax son
33 | About 55 clubs in the draw hoping for
34 | Tough game for sure
35 | FA Cup third round opponents
36 | Premier League
37 | putting up as we speak mate
38 | Hearing from someone at that allocation for likely to be (Before police have a say) with wanting to push for more
39 | Am I right in saying that in the current side only and won FA cup?
40 | Both have made 263 overall appearances for
41 | made his overall appearance for
42 | Full time at the stadium
43 | the game is finished final score is
44 | minutes added time
45 | because our group games are not that bad
46 | WIN Tickets for match
47 | Intriguing matchup
48 | If belongs to Jesus I hope He kept the receipt
49 | Day Three of Football Carol Calendar Old King Kenny
50 | Currently Ranks in the All Time goalscorers listing for Manchester United
51 | it's halftime in the game between those two
52 | Did You Know: yesterday joined the other 83 players who have scored only once in their careers
53 | Another typically easy cup draw for the single hardest of the possibilities (home/away to 71 teams)
54 | Wowsers as Joe Hart would say
55 | I think we may have to bring our game up a little bit and make sure we don't underestimate the group stages
56 | Show your support tweeps and watch the youth team play Torquay in the youth cup now on mutv
57 | They're young and every young player wants to play and we have to give them that opportunity
58 | is ready to send and out on loan
59 | We have our pride to protect and our history to protect Every time we walk on the pitch it's important
60 | Does anyone know how to adjust the balance on the volume on a Samsung tv
61 | I can only hear the Palace fans
62 | subs substitutes bench benched
63 | Nothing is impossible except writing an article about
64 | will allow Bayern Munich to use the training facilities at Carrington ahead of their #CL encounter against rivals next week
65 | is 38 today Played 887 times for 129 more than in second And more than twice as many as in 18th
66 | article on contract talks and his new advisor
67 | now on twitter
68 | Today is a online day for
69 | Reserves are currently 2nd place behind in the Barclay's Premier Reserve League North 3 points behind & both played 6 games
70 | that player is here
71 | must be very furious
72 | all is back to normal
73 | fans think that Viva is trending cause of them NO ITS NOT ITS CAUSE OF fans were chanting it
74 | Compare tickets prices at
75 |
--------------------------------------------------------------------------------
/Code/sentiment_word_files/tweets_positive.txt:
--------------------------------------------------------------------------------
1 | Performance proves is far from finished
2 | Defensive show against Sunderland best of the season
3 | A day to remember pleased with victory
4 | Loan move was the making of me
5 | Best form this season has coincided with him starting in the centre of midfield
6 | deflects a volley and scores a lucky goal!
7 | MUFC are the best
8 | In the midst of the love it was who made the save of the day from
9 | To be fair pulled of a cracking save from 's half-volley
10 | Incredible save
11 | Top class save
12 | It was a fantastic performance from us had four clear chances and we played some great football
13 | At least the performance wasn't that Midfield looked lively with coming in
14 | His performance was fantastic
15 | Good Play
16 | I'm sure is quaking in his boots after this performance
17 | He was immense
18 | Good news that he's been playing so well
19 | Was revealed that he is fit for the game
20 | Are set to welcome back the star
21 | we have lots of great players
22 | he's probably moved himself up the pecking order
23 | I thought he was good tonight Got most of his passes right and had plenty of nice little flicks and link ups
24 | showed what having a good touch and ball retention brings
25 | His flicks and passes were spot on for the most part
26 | He is the MOTM in my opinion
27 | I thought his debut was exciting
28 | Nice flicks and decent all round
29 | I thought he was fantastic his ability to find space was beyond his years
30 | I'd like to see him with the big boys around him
31 | he was the only one driving the team forward
32 | he showed how mature he is on the pitch
33 | He is very mature for his age
34 | I thought it was a good performance by him
35 | I thought he did really well and took hold of the game
36 | He looks settled in
37 | this will be a valuable learning experience for him
38 | We were all over them for the first half
39 | He looked good Definitely heading in the right direction
40 | looked for the ball and showed confidence
41 | We have a great squad
42 | we are strong in all other areas
43 | I agree he is a top player
44 | He has a lot of excellent qualities
45 | His crossing of late has been awesome
46 | It was vibrant attacking and a joy to watch
47 | We looked threatened at the back at times but at the very least we played like we wanted to win games
48 | we have great creativity in the middle
49 | he's perfect for us
50 | It then wasn’t just a rocket it was weighted beautifully
51 | I think the best one I have seen in person
52 | Incredible strike
53 | Definitely one of the best long-rangers if not the best
54 | What a rocket from him
55 | Great determination from him
56 | he is in good form
57 | he makes driving powerful runs
58 | he is World Class
59 | he is a joke
60 | He is amazing at running at people
61 | he looks a bit more natural with the ball
62 | Better defender than for sure
63 | I am Impressed
64 | He did everything right today
65 | we are more sound defensively
66 | he is a more mature defender
67 | Great display overall
68 | Those powerful bursts into the heart of their defences are lovely to watch
69 | he is more talented than most
70 | He is a great talent who needs time and work
71 | His shot stopping is getting very good one of the best with his feet already
72 | he has been excellent this season
73 | this kid has everything required to be one of the best ever
74 | I can't think of a keeper who has made fewer errors performed better than him
75 | If he was English they'd all be jerking off about his talent
76 | He is going to be the best in the world in 2 or 3 years
77 | clean sheets
78 | Another clean sheet from us
79 | Great to get a clean sheet
80 | Great reflex save
81 | His crossing was quite good I thought
82 | His all round game was actually quite good today
83 | we are having an amazing season
84 | We have had a fantastic start to the season when you look at our stats
85 | he thinks he is a better defender
86 | he knows he is his best defender
87 | He was fantastic
88 | Fantastic display tonight
89 | epic performance tonight
90 | What a great club and what great managers
91 | Brilliant performance
92 | He destroyed them
93 | Absolutely brilliant
94 | I love his work
95 | I love this man brilliant
96 | Such a legend
97 | he is the greatest legend of our era
98 | Such class from the youngster
99 | He really slaughtered them right off the bat there
100 | we are steam-rolling teams at the minute
101 | He is such a genius
102 | Our defence looked decent
103 | Our defense looked decent
104 | At least our defence looks solid again
105 | I think this might be the perfect situation for us right now
106 | Our immensely talented
107 | He is a cracking player
108 | He'd be our best midfielder and captain
109 | He was awesome all the way up
110 | Unreal to be fair
111 | one of the best strikes of all time
112 | That was by far the best goal I've seen this season though absolutely magnificent shot
113 | goal of the season
114 | their shape was brilliant
115 | Stunning is the right word
116 | truly great goal
117 | Fantastic strike
118 | returns to action
119 | he is fit for action and has returned
120 | he passed his fitness test
121 | ready to play
122 | brilliant cross and fantastic goal
123 | midfield general box to box crisp passing great vision cracking shot
124 | Was very impressive today
125 | Promising young midfielders
126 | I felt that he was awesome though
127 | we were completely dominant
128 | But he was brilliant in that position
129 | He is very good in the transfer market no doubt
130 | We were blessed with a good draw
131 | He was outstanding
132 | Looked bright
133 | His touch is excellent
134 | I think he has a great future
135 | were really very good indeed
136 | His flicks were great
137 | he is one of our best player
138 | Man Of The Match
139 | was very encouraging
140 | He is a supremely talented player
141 | Looks a good player
142 | cheer up
143 | that was amazingly saved
144 | had a fantastic season
145 | He was very good
146 | He is a fantastic young player
147 | years ahead of them
148 | He is years ahead of his peers
149 | he is well ahead
150 | great intelligence
151 | high praise
152 | Defensively I thought he was excellent he handled him perfectly
153 | Clearly a very special and exciting talent
154 | set the world alight
155 | has been impressive for them
156 | fantastic experience
157 | good decision
158 | he should become fantastic soon
159 | works well for the team
160 | IMO it was fantastic
161 | he is a top quality player
162 | He's undeniably a great player
163 | Our best player
164 | He's an excellent player a terrific striker
165 | a great scorer
166 | no doubt he's one of the best in the world
167 | He has superb abillity
168 | he loves the game
169 | a brilliant player
170 | Great player whos turned his game around
171 | On form one of the top strikers in the world
172 | He's a brilliant player at times the heartbeat of the team
173 | Cracking player one of the best in the world
174 | World class player
175 | Technically very good quick strong and when on form his drive determination and invention is inspirational
176 | He's very good and extremely good on his day
177 | The guy who has been possibly the best
178 | definitely a very good player
179 | the best striker in the world
180 | played well the team played well
181 | his potential is absolutely immense
182 | freaks of nature to be so good so young
183 | One of the best players on the planet
184 | Skill pace and unpredictability
185 | top performers
186 | His vision has been fantastic
187 | Man of the match
188 | World class player
189 | best player in the world
190 | using that to play excellent football
191 | Rooney was fucking great tonight He's a fucking great player
192 | It is widely acknowledged that he is a fantastic footballer
193 | Best performance
194 | He was arguably the best striker in the world last season
195 | Brilliant last night scoring one of the goals of the season
196 | Outstanding fantastic good vision great technique great performance
197 | He is a superb player
198 | is the heartbeat
199 | is a great striker no doubt
200 | he is our best player and he is one of the best players in the world he's just too good
201 | is a much better all round striker
202 | be the best striker in the world
203 | he's on the top 5 most skillful strikers
204 | is a better player
205 | class act
206 | has a brilliant record
207 | the best strikers in the world
208 | does everything right
209 | has the best potential determination is great all around
210 | he was brilliant for them
211 | I thought he was perfect for the role he was given
212 | he was brilliant
213 | Oh and had a good game
214 | As good as any of the many games on his own up top last season
215 | Very close to being back at his best
216 | Great first touch
217 | that very impressive
218 | our best player
219 | his crossing is very good
220 | He's been starting games and performing brilliantly
221 | He has so many good qualities
222 | there are not many as good or great as him
223 | his crossing has improved
224 | Was fantastic against
225 | Brilliant from him today
226 | He was great today thought he showed great vision
227 | Great work from him
228 | Thought he was quality today
229 | Played very very well
230 | He's a damn good versatile player
231 | He's been world class for a number of seasons
232 | an excellent performance
233 | was even better
234 | is a fantastic player
235 | how good this guy can be
236 | I think is world class
237 | Glory Glory Man United
238 | bounce back from
239 | scored his first
240 | scored his first goal helping them to a victory over
241 | volley sees past clinched a victory at
242 | bounce back from Cup loss
243 | scores the winner
244 | scored the only goal as
245 | scored his first goal
246 | Betting: Betfair are backing to score at Villa Park
247 | made as many Interceptions as the entire
248 | scored in both matches for
249 | the defence was awesome
250 | the defense was awesome
251 | great goal
252 | fantastic goal
253 | first career goal gets back on track
254 | Another win for the team
255 | first goal for the club earns resilient all three points in tight game
256 | 3 important points & scored
257 | great victory
258 | has scored goals in his last games against Devastating
259 | has scored goals in his last games against Devastating
260 | He's been good since his last meeting with them
261 | that's great news about
262 | IMO he has been our best player
263 | That's great news
264 | awesome this evening composed if not combative better and slicker very graceful
265 | good news for us
266 | he was magnificent for us
267 | good to hear that he hasn't suffered a long term injury
268 | fantastic news
269 | Can't wait to see have him starting again
270 | happy to see him back
271 | he is not shit he is quite good actually
272 | what a great draw for us
273 | Happy with England's group
274 | Doesn't sound so bad
275 | we haven't had any problems yet we have a good team and players
276 | great win by the kids
277 | he's much better than other kids at his age
278 | is always joking with us since the beginning trying to make us relax
279 | He played brilliant when he was in CM tonight & when he came back into defence I didn't know was off
280 | Best draw possible
281 | Knocking out the cup could be a great psychological boost in the title race
282 | I'm hoping he will start today cause he's been fantastic
283 | I think overall he's been a fantastic signing for us
284 | I know he's the best player
285 | We are playing some fantastic football
286 | This time we are playing fantastic in the cup
287 | Looking forward to tonight Hope and get a chance to impress
288 | Happy Birthday to at a legendary symbol & a champion to admire
289 | continues tribute to He became part of our football family after settling in these parts as manager of
290 | rising star Top lad too
291 | highly-rated highly rated
292 | We won this time and I hope it will continue
293 | Top of the league
294 | good cross from him great determination
295 | Win Against will seal our 100th CL win Yet Another Historic moment Awaits Well done so lets win
296 | I love when we win top teams so let's hope that we win again
297 | Boss backs his players
298 | can score goals The boy is a finisher
299 | he is a great finisher
300 | he is such a good player he will be missed and we will miss him
301 | awesome we score again
302 | he is very important because he can score goals
303 | I thought played extremely well yesterday
304 | They want him so bad
305 | Not a bad draw for them
--------------------------------------------------------------------------------
/Code/twitter_aggregator.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # encoding: utf-8
3 | """
4 | twitter_aggregator.py
5 |
6 | Created by Elvar Orn Unnthorsson on 07-12-2011
7 | Copyright (c) 2011 ellioman inc. All rights reserved.
8 | """
9 |
10 | import string
11 | import sys
12 | import os
13 | import re
14 | import datetime
15 | import twitter
16 | import time
17 | import redis
18 | from os.path import join as pjoin
19 | import ast
20 |
21 |
22 | class TwitterAggregator:
23 |
24 | """
25 | TwitterAggregator performs a Twitter GET Search and harvests tweets using the search parameters
26 | given to it. It saves the twitter data, from the search, to a redis database and allows the user
27 | to get the data by calling the function "get_tweets()".
28 | """
29 |
30 | def __init__( self ):
31 | """
32 | Constructs a new TwitterAggregator instance.
33 | """
34 |
35 | self.redis = redis.Redis()
36 | self.info_to_get = ['text', 'profile_image_url', 'from_user']
37 | self.search_results = {}
38 | self.raw_data_directory_name = "raw_mining_data"
39 | self.filtered_data_directory_name = "filtered_mining_data"
40 | english_file = pjoin( sys.path[0], "sentiment_word_files", "Nielsen2010Responsible_english.csv")
41 | self.analyzeEnglish = dict(map(lambda (w,e): (w, int(e)), \
42 | [ line.strip().lower().split('\t') for line in open(english_file) ]))
43 | self.tweets_count = 0
44 |
45 |
46 | def twitter_search( self, search_terms = [], pages = 1, results_per_page = 100 ):
47 | """
48 | twitter_search( self, search_terms = [], pages = 1, results_per_page = 100 ):
49 | Input: search_terms. A list of search terms to for searching Twitter.
50 | Input: pages. A Number that determines how many pages of tweets to search for.
51 | Input: results_per_page. A Number which determines how many tweet results should be on each page.
52 | Searches twitter for the things listed in the search_terms list and saves
53 | the data collected, in a Redis database.
54 | """
55 |
56 | if search_terms == []: return ''
57 |
58 | self.pages = pages
59 | self.results_per_page = results_per_page
60 | twitter_search = twitter.Twitter( domain="search.twitter.com" )
61 | search_results = []
62 |
63 | try:
64 | # For each search term...
65 | for term in search_terms:
66 | results = []
67 | for page in range( 1, pages+1 ):
68 | results.append(twitter_search.search( q=term, rpp=results_per_page, page=page, result_type="recent" ) )
69 |
70 | # Get the tweets from the search
71 | new_tweets_ids = self.__get_tweet_ids( search_results=results )
72 |
73 | # Save tweets and other information to the database
74 | term_redis_name = term.replace( " ", "_" )
75 | term_tweetsIds_name = term_redis_name + "$TweetIds"
76 | term_searchcount_name = term_redis_name + "$SearchCount"
77 |
78 | if self.redis.exists( term_redis_name ):
79 | current_tweets_ids = ast.literal_eval( self.redis.get( term_tweetsIds_name ) )
80 | current_tweets_ids.append( new_tweets_ids )
81 | self.redis.set( term_tweetsIds_name, current_tweets_ids )
82 | self.redis.set( term_searchcount_name, int( self.redis.get( term_searchcount_name ) ) + 1 )
83 | else:
84 | self.redis.set( term_redis_name, True )
85 | self.redis.set( term_tweetsIds_name, [new_tweets_ids] )
86 | self.redis.set( term_searchcount_name, 1 )
87 |
88 | except:
89 | raise Exception ("Unknown error in TwitterAggregator::twitter_search")
90 |
91 |
92 | def get_tweets( self, search_terms = [], return_all_tweets = True ):
93 | """
94 | get_tweets( self, search_terms = [], return_all_tweets = True ):
95 | Input: search_terms. A list of search terms to fetch from the database.
96 | Input: return_all_tweets. Boolean that determines wether to get all tweets or from the last search.
97 | Fetches from the database each tweet text, username and url to the user's display pictures for each
98 | search term given in the "search_term" parameter.
99 | Return: A list which contains lists that has each tweet text, username and url to profile picture.
100 | """
101 |
102 | returnList = []
103 |
104 | # If the search term list is empty, return an emptylist.
105 | if search_terms == []: return []
106 |
107 | try:
108 | # If not then get information about each tweet and put it in a list.
109 | for term in search_terms:
110 | term_redis_name = term.replace( " ", "_" )
111 | # Skip if the search term isn't in the database
112 | if not self.redis.exists( term_redis_name ):
113 | print "Error: The search term", term, "does has not been searched for before..."
114 | continue
115 |
116 | term_tweetsIds_name = term_redis_name + "$TweetIds"
117 | tweet_searches = ast.literal_eval( self.redis.get(term_tweetsIds_name) )
118 |
119 | if return_all_tweets:
120 | ids = list( set( [ t_id for results in tweet_searches for t_id in results ] ) )
121 | tweet_info = [ self.redis.get( t_id ) for t_id in ids ]
122 |
123 | for t in tweet_info:
124 | returnList.append( ast.literal_eval( t ) )
125 | self.tweets_count += 1
126 |
127 | else:
128 | ids = list( set( [ t_id for t_id in tweet_searches[ len(tweet_searches)-1 ] ] ) )
129 | tweet_info = [ self.redis.get( t_id ) for t_id in ids ]
130 |
131 | for t in tweet_info:
132 | returnList.append( ast.literal_eval( t ) )
133 | self.tweets_count += 1
134 |
135 | return returnList
136 |
137 | except:
138 | raise Exception ("Unknown error in TwitterAggregator::__get_tweet_ids")
139 | return []
140 |
141 |
142 | def __get_tweet_ids( self, search_results = [] ):
143 | """
144 | __get_tweet_ids( self, search_term = "", search_results = [] ):
145 | Input: search_results. A list with the JSON results from the Twitter API
146 | Fetches the tweet ids from the JSON results.
147 | Return: A list containing the ids found.
148 | """
149 |
150 | # Return empty list if the list in the parameter is empty
151 | if search_results == []: return []
152 |
153 | count = 0
154 | tweet_ids = []
155 | non_english_tweets = 0
156 |
157 | try:
158 | # For each search result...
159 | for result in search_results:
160 |
161 | # For each tweet found...
162 | for tweet in result['results']:
163 | # Skip tweets that are not in english
164 | if not self.__is_english_tweet( tweet['text'] ) :
165 | continue
166 |
167 | tweet_info = []
168 | # Get each information data that was requested...
169 | for fetched_data in self.info_to_get:
170 | if ( type(tweet[fetched_data]) == int): tweet_info.append( tweet[fetched_data] )
171 | else: tweet_info.append( tweet[fetched_data].encode('ascii', 'ignore') )
172 |
173 | # Append the information to the gathered list
174 | tweet_ids.append( tweet['id_str'] )
175 |
176 | # Put the tweet info in the database with the string ID as key
177 | self.redis.set( tweet['id_str'], tweet_info )
178 | return tweet_ids
179 |
180 | except:
181 | raise Exception ("Unknown error in TwitterAggregator::__get_tweet_ids")
182 | return []
183 |
184 |
185 | def __is_english_tweet( self, tweet ):
186 | """
187 | __is_english_tweet( self, tweet ):
188 | Input: tweet. A string containing a tweet to check.
189 | Determines whether a comment is an english one or not. This function
190 | was given to the author by Helgi who is a fellow student at DTU.
191 | Return: True if english, False if not not english
192 | """
193 |
194 | try:
195 | lang = sum(map(lambda w: self.analyzeEnglish.get(w, 0), \
196 | re.sub(r'[^\w]', ' ', string.lower(tweet)).split()))
197 |
198 | if lang >= 1.0: return True
199 | else: return False
200 | except:
201 | raise Exception ("Unknown error in TwitterAggregator::__isEnglishTweet")
202 | return False
203 |
--------------------------------------------------------------------------------
/Code/twitter_sentiment_analysis.tmproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | currentDocument
6 | football_analyzer.py
7 | documents
8 |
9 |
10 | filename
11 | twitter_aggregator.py
12 | lastUsed
13 | 2012-06-27T13:12:16Z
14 |
15 |
16 | filename
17 | football_analyzer.py
18 | lastUsed
19 | 2012-06-27T13:12:16Z
20 | selected
21 |
22 |
23 |
24 | filename
25 | html_creator.py
26 | lastUsed
27 | 2011-12-06T02:32:55Z
28 |
29 |
30 | filename
31 | sentiment_analyzer.py
32 | lastUsed
33 | 2012-06-27T13:07:16Z
34 |
35 |
36 | filename
37 | sentiment_word_files/AFINN-111.txt
38 | lastUsed
39 | 2011-12-01T00:49:04Z
40 |
41 |
42 | filename
43 | html/word_cloud.css
44 | lastUsed
45 | 2011-12-05T23:54:57Z
46 |
47 |
48 | filename
49 | sentiment_word_files/tweets_negative.txt
50 | lastUsed
51 | 2011-12-06T01:53:11Z
52 |
53 |
54 | filename
55 | sentiment_word_files/tweets_positive.txt
56 | lastUsed
57 | 2011-12-06T01:46:22Z
58 |
59 |
60 | filename
61 | sentiment_word_files/tweets_neutral.txt
62 | lastUsed
63 | 2011-12-06T01:46:24Z
64 |
65 |
66 | filename
67 | html/template/Template.html
68 | lastUsed
69 | 2011-12-06T02:28:17Z
70 |
71 |
72 | filename
73 | html/main.css
74 | lastUsed
75 | 2011-12-04T21:39:12Z
76 |
77 |
78 | fileHierarchyDrawerWidth
79 | 181
80 | metaData
81 |
82 | football_analyzer.py
83 |
84 | caret
85 |
86 | column
87 | 32
88 | line
89 | 70
90 |
91 | firstVisibleColumn
92 | 0
93 | firstVisibleLine
94 | 0
95 |
96 | html/template/Template.html
97 |
98 | caret
99 |
100 | column
101 | 20
102 | line
103 | 18
104 |
105 | firstVisibleColumn
106 | 0
107 | firstVisibleLine
108 | 0
109 |
110 | html/word_cloud.css
111 |
112 | caret
113 |
114 | column
115 | 8
116 | line
117 | 81
118 |
119 | firstVisibleColumn
120 | 0
121 | firstVisibleLine
122 | 0
123 |
124 | html_creator.py
125 |
126 | caret
127 |
128 | column
129 | 80
130 | line
131 | 27
132 |
133 | columnSelection
134 |
135 | firstVisibleColumn
136 | 0
137 | firstVisibleLine
138 | 115
139 | selectFrom
140 |
141 | column
142 | 1
143 | line
144 | 21
145 |
146 | selectTo
147 |
148 | column
149 | 80
150 | line
151 | 27
152 |
153 |
154 | sentiment_analyzer.py
155 |
156 | caret
157 |
158 | column
159 | 16
160 | line
161 | 18
162 |
163 | columnSelection
164 |
165 | firstVisibleColumn
166 | 0
167 | firstVisibleLine
168 | 72
169 | selectFrom
170 |
171 | column
172 | 6
173 | line
174 | 18
175 |
176 | selectTo
177 |
178 | column
179 | 23
180 | line
181 | 18
182 |
183 |
184 | sentiment_word_files/tweets_negative.txt
185 |
186 | caret
187 |
188 | column
189 | 34
190 | line
191 | 240
192 |
193 | firstVisibleColumn
194 | 0
195 | firstVisibleLine
196 | 270
197 |
198 | sentiment_word_files/tweets_neutral.txt
199 |
200 | caret
201 |
202 | column
203 | 40
204 | line
205 | 44
206 |
207 | firstVisibleColumn
208 | 0
209 | firstVisibleLine
210 | 17
211 |
212 | sentiment_word_files/tweets_positive.txt
213 |
214 | caret
215 |
216 | column
217 | 26
218 | line
219 | 272
220 |
221 | firstVisibleColumn
222 | 0
223 | firstVisibleLine
224 | 247
225 |
226 | twitter_aggregator.py
227 |
228 | caret
229 |
230 | column
231 | 48
232 | line
233 | 78
234 |
235 | firstVisibleColumn
236 | 0
237 | firstVisibleLine
238 | 58
239 |
240 |
241 | openDocuments
242 |
243 | football_analyzer.py
244 | twitter_aggregator.py
245 | sentiment_analyzer.py
246 | html_creator.py
247 | html/template/Template.html
248 | sentiment_word_files/tweets_positive.txt
249 | sentiment_word_files/tweets_neutral.txt
250 | sentiment_word_files/tweets_negative.txt
251 | html/word_cloud.css
252 |
253 | shellVariables
254 |
255 |
256 | enabled
257 |
258 | value
259 | /opt/local/bin/python
260 | variable
261 | TM_PYTHON
262 |
263 |
264 | showFileHierarchyDrawer
265 |
266 | windowFrame
267 | {{195, 0}, {1251, 1028}}
268 |
269 |
270 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Twitter Sentiment Analysis
2 |
3 | ## Description ##
4 | Twitter crawler that performs a sentiment analysis to determine whether tweets about something/someone are positive or negative. Project was done as a final project in a Python course at Danmarks Tekniske Universitet (DTU) in the fall of 2011.
5 |
6 | ## Requirements ##
7 | The program uses the [data structure server Redis](http://redis.io/ "Redis Homepage"), to save the data collected. It therefore must be installed and running (by calling "redis-server") on the client's computer when using the program.
8 |
9 | The program also uses [Mako Templates](http://www.makotemplates.org/download.html "Mako Homepage") for Python to create a webpage with the results.
10 |
11 |
--------------------------------------------------------------------------------
/Report/Paper.tmproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | currentDocument
6 | chapters/1_introduction.tex
7 | documents
8 |
9 |
10 | filename
11 | master2010.tex
12 | lastUsed
13 | 2011-12-06T23:26:30Z
14 |
15 |
16 | filename
17 | README.txt
18 | lastUsed
19 | 2011-10-27T13:37:47Z
20 |
21 |
22 | filename
23 | style/thesislayout.sty
24 | lastUsed
25 | 2011-10-27T14:09:09Z
26 |
27 |
28 | filename
29 | style/Mythesis.sty
30 | lastUsed
31 | 2011-10-27T13:47:12Z
32 |
33 |
34 | filename
35 | style/thesisdef.sty
36 | lastUsed
37 | 2011-10-27T13:47:09Z
38 |
39 |
40 | filename
41 | chapters/1_introduction.tex
42 | lastUsed
43 | 2011-12-06T23:26:34Z
44 | selected
45 |
46 |
47 |
48 | filename
49 | chapters/2_design_of_the_program.tex
50 | lastUsed
51 | 2011-12-06T23:26:34Z
52 |
53 |
54 | filename
55 | chapters/3_implementation.tex
56 | lastUsed
57 | 2011-12-06T23:24:10Z
58 |
59 |
60 | filename
61 | chapters/4_results.tex
62 | lastUsed
63 | 2011-12-06T23:26:12Z
64 |
65 |
66 | filename
67 | chapters/appendix1.tex
68 | lastUsed
69 | 2011-12-06T02:46:39Z
70 |
71 |
72 | filename
73 | chapters/appendix2.tex
74 | lastUsed
75 | 2011-12-06T02:58:55Z
76 |
77 |
78 | fileHierarchyDrawerWidth
79 | 217
80 | metaData
81 |
82 | chapters/1_introduction.tex
83 |
84 | caret
85 |
86 | column
87 | 0
88 | line
89 | 1
90 |
91 | firstVisibleColumn
92 | 0
93 | firstVisibleLine
94 | 0
95 |
96 | chapters/2_design_of_the_program.tex
97 |
98 | caret
99 |
100 | column
101 | 9
102 | line
103 | 50
104 |
105 | firstVisibleColumn
106 | 0
107 | firstVisibleLine
108 | 0
109 |
110 | chapters/3_implementation.tex
111 |
112 | caret
113 |
114 | column
115 | 15
116 | line
117 | 81
118 |
119 | firstVisibleColumn
120 | 0
121 | firstVisibleLine
122 | 0
123 |
124 | chapters/4_results.tex
125 |
126 | caret
127 |
128 | column
129 | 15
130 | line
131 | 12
132 |
133 | firstVisibleColumn
134 | 0
135 | firstVisibleLine
136 | 0
137 |
138 | chapters/appendix1.tex
139 |
140 | caret
141 |
142 | column
143 | 30
144 | line
145 | 11
146 |
147 | firstVisibleColumn
148 | 0
149 | firstVisibleLine
150 | 0
151 |
152 | chapters/appendix2.tex
153 |
154 | caret
155 |
156 | column
157 | 58
158 | line
159 | 827
160 |
161 | firstVisibleColumn
162 | 0
163 | firstVisibleLine
164 | 808
165 |
166 | master2010.tex
167 |
168 | caret
169 |
170 | column
171 | 47
172 | line
173 | 12
174 |
175 | firstVisibleColumn
176 | 0
177 | firstVisibleLine
178 | 0
179 |
180 |
181 | openDocuments
182 |
183 | master2010.tex
184 | chapters/1_introduction.tex
185 | chapters/2_design_of_the_program.tex
186 | chapters/3_implementation.tex
187 | chapters/4_results.tex
188 | chapters/appendix1.tex
189 | chapters/appendix2.tex
190 |
191 | showFileHierarchyDrawer
192 |
193 | windowFrame
194 | {{322, 43}, {1016, 1015}}
195 |
196 |
197 |
--------------------------------------------------------------------------------
/Report/README.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/README.txt
--------------------------------------------------------------------------------
/Report/bibbase.bib:
--------------------------------------------------------------------------------
1 | % This file was created with JabRef 2.3.1.
2 | % Encoding: ISO-8859-1
3 |
4 | @MASTERSTHESIS{knueppel2008,
5 | author = {Kn{\"u}ppel, Thyge},
6 | title = {Structural Analysis for Fault Detection and Isolation in Electrical
7 | Distribution Systems},
8 | school = {Technical University of Denmark},
9 | year = {2008},
10 | type = {Master's Thesis},
11 | address = {Department of Electrical Engineering, Centre for Eletric Technology
12 | and Section for Automation},
13 | month = {April},
14 | file = {:msc_thesis_knueppel.pdf:PDF},
15 | owner = {thyge},
16 | timestamp = {2008.05.19},
17 | url = {http://www.elektro.dtu.dk/forskning/eltek/projekter_uddannelse/08/tk.aspx}
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/Report/chapters/1_introduction.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | \chapter[Introduction]{Introduction}
3 | \label{chap:Introduction}
4 |
5 | This report describes in detail the design and implementation of the final project done for the course 02820 Python Programming.\\
6 |
7 | There have been many projects that try to do sentiment analysis of text but, to the best of the author's knowledge,
8 | none have focused on football related comments and tweets from fans of the sport. It seemed ideal to the author to
9 | look at that area and see if he could create a program that can see if fans are speaking positively or negatively
10 | towards players, teams, managers, referees, something that happens in a game etc.\\
11 |
12 | The main goal of the project was to a create a program that collects football related comments and tweets from Twitter,
13 | perform a sentimental analysis of of each tweet collected and to show the results by creating a webpage. The program was
14 | written with the Python programming language, uses the Twitter GET Search API to collect tweets, performs the analysis
15 | using Naive Bayes Classifier and displays the results in a simple html webpage.\\
16 |
17 | An additional feature was to try to put collected data in a database. This is beneficial as the program can easily fetch
18 | old data, for searches that have already been done before, and use it with the newly harvested tweets.\\
19 |
20 | The work for this project was done between 29.August and 7.December in the fall semester of 2011.
21 |
--------------------------------------------------------------------------------
/Report/chapters/2_design_of_the_program.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | \chapter[Design of the program]{Design of the program}
3 | \label{chap:design_of_the_program}
4 |
5 | This chapter focuses on the program's design and thoughts behind it.\\
6 |
7 | From the beginning the author knew that he wanted to accomplish three things:
8 | \begin{itemize}
9 | \item Harvest tweets
10 | \item Analyze the harvested tweets
11 | \item Display the results
12 | \end{itemize}
13 |
14 | So it naturally made sense to create separate classes for each of those tasks. The author also decided to
15 | create a main class for the program, whose task would be to call the other classes with appropriate parameters
16 | and display the program's status during runtime. Then for the additional feature, to save the tweets collected
17 | in a database, it seemed only natural that the class responsible for the tweet harvesting should be the one that
18 | saves the data and offers other classes access to the data to the database.\\
19 |
20 | After looking at a few database solutions the author decided to use the Redis solution because of its simplicity
21 | and ease of use and also to minimize time required for the author to familiarize with the solution since he had
22 | used Redis in a different DTU course this semester.\\
23 |
24 | The program therefore consists of four separate Python classes and a Redis database. Each module servers a specific
25 | purpose in order to accomplish the program's objective. Section 2.4 shows the class overview.
26 |
27 | \section{Class FootballAnalyzer} \label{sec:FootballAnalyzerDesign}
28 | The FootballAnalyzer class is the main class in the program and gives other classes the parameters needed
29 | and receives the data from them. It also displays on the command line the progress of the search, analysis
30 | and html creation.
31 |
32 | \section{Class TwitterAggregator} \label{sec:TwitterAggregatorDesign}
33 | The TwitterAggregator purpose is to search Twitter for tweets, get and save the relevant data to a database
34 | and offer other classes the chance to retrieve the tweet data that has been harvested.
35 |
36 | \section{Class SentimentAnalyzer} \label{sec:SentimentAnalyzerDesign}
37 | The SentimentAnalyzer's job is to create a Naive Bayes classifier that uses manually analyzed data, created
38 | by the author, to train how to recognize positive, negative and neutral tweets. The class then takes a list
39 | of tweets and performs a sentiment analysis to classify them into appropriate categories and returns a list
40 | with the classification information appended to the list.
41 |
42 | \section{Class HTMLCreator} \label{sec:HTMLCreatorDesign}
43 | The HTMLCreator is the class responsible for creating the web page that displays the results from the football
44 | analyzer. It takes a dictionary of statistics gathered while harvesting and analyzing the tweets and a list of
45 | all tweets analyzed in the run of the program. \\
46 |
47 | The class then displays the statistics, creates a word cloud of the most popular words used in the tweets and
48 | lists every tweet sent to it, colored in a way so that it is easy to see how the classifier classified each
49 | tweet that it was give.
50 |
51 | \section{Overview} \label{sec:ClassOverview}
52 | \begin{figure}[ht]
53 | \centering
54 | \includegraphics[height=330px]{images/ClassOverview.png}
55 | \caption{ Class overview of the football analyzer }
56 | \label{fig:images_ClassOverview}
57 | \end{figure}
--------------------------------------------------------------------------------
/Report/chapters/3_implementation.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | \chapter[Implementation]{Implementation}
3 | \label{chap:Implementation}
4 |
5 | This chapter focuses on how the classes and database were implemented in to the system.
6 |
7 | \section{Class FootballAnalyzer} \label{sec:FootballAnalyzerImplementation}
8 | FootballAnalyzer has the following functions:\\
9 |
10 | {\bf Public}
11 | \begin{itemize}
12 | \item run( self )
13 | \end{itemize}
14 |
15 | {\bf Private}
16 | \begin{itemize}
17 | \item \_\_search( self )
18 | \item \_\_analyze( self, tweets )
19 | \item \_\_create\_webpage( self, analyzed\_tweets )
20 | \item \_\_start\_task( self )
21 | \item \_\_end\_task( self )
22 | \item \_\_print\_time( self, delay )
23 | \end{itemize}
24 |
25 | The FootballAnalyzer creates an instance of the TwitterAggregator to get the tweets defined in the search parameters. It then creates an instance of the SentimentAnalyzer and makes it analyze all the tweets that were harvested from Twitter to get the sentiment classification of each tweet collected. \\
26 |
27 | Finally it creates an instance of the HTMLCreator, sends the data from the aggregator and analyzer and makes it create a webpage that shows the results from the program.\\
28 |
29 | To use the FootballAnalyzer you have define search terms and specify how many pages of tweets you want the class to search for and how many tweets should be on each page. With those parameters defined you can create an instance of the class and make it run by calling the run() function.\\
30 |
31 | \clearpage
32 |
33 | \section{Class TwitterAggregator} \label{sec:TwitterAggregatorImplementation}
34 | FootballAnalyzer has the following functions:\\
35 |
36 | {\bf Public}
37 | \begin{itemize}
38 | \item twitter\_search( self, search\_terms, pages, results\_per\_page )
39 | \item get\_tweets( self, search\_terms, return\_all\_tweets )
40 | \end{itemize}
41 |
42 | {\bf Private}
43 | \begin{itemize}
44 | \item \_\_get\_tweet\_ids( self, search\_results )
45 | \item \_\_is\_english\_tweet( self, tweet )
46 | \end{itemize}
47 |
48 | The TwitterAggregator performs a Twitter GET Search and harvests tweets using the search parameters given to it. It saves the twitter data, from the search, to a redis database and allows the user to get the data by calling the function "get\_tweets()".\\
49 |
50 | Redis is a Key-Value type of database. The aggregator saves four different keys in the system. First it saves the search parameter, with spaces replaced by underscores, with the value True so it is easy to see if a search has been performed with those parameters. An example of this would be the key "Manchester\_United" and value "True". Next is saves a key with the search parameter and "\$TweetIds" appended to it and the value is a list of all tweet ids found in the search. Example of this is the key "Manchester\_United\$TweetIds" and value [u'143863607367700480', u'143863033024876544'...]. \\
51 |
52 | To keep track of how many times a search has been performed in the program, the aggregator saves a key with the search parameter and "\$SearchCount" appended to it. Example is the key "Manchester\_United\$SearchCount" and value 5. Finally, to get the data from each tweet id, the aggregator saves each tweet id with the name "ID\$" and the id appended to the name. The value is a list which contains the tweet text, username and a URL to the profile picture of the user who created the tweet. An example would be the key "ID\$143863033024876544" and value ["Manchester United won today. Great!",\\ 'http://a1.twimg.com/sticky/default\_profile\_images/default\_profile\_2\_normal.png', 'velvetdismality']. \\
53 |
54 | To use the TwitterAggregator you create an instance of the aggregator and call the twitter\_search() function with the search parameters, how many pages and number of tweets requested as parameters. Then to get the tweets collected, you call the get\_tweets() function with the search terms you want data from and True or False depending on whether you want all tweets with that search term or just the tweets harvested in the last run.\\
55 |
56 | \section{Class SentimentAnalyzer} \label{sec:SentimentAnalyzerImplementation}
57 | FootballAnalyzer has the following functions:\\
58 |
59 | {\bf Public}
60 | \begin{itemize}
61 | \item analyze( self, data )
62 | \item get\_analysis\_result( self, data\_to\_get )
63 | \item show\_most\_informative\_features( self, amount )
64 | \end{itemize}
65 |
66 | {\bf Private}
67 | \begin{itemize}
68 | \item \_\_init\_naive\_bayes( self )
69 | \item \_\_check\_word( self, word )
70 | \item \_\_analyze\_tweet( self, tweet )
71 | \item \_\_analyse\_using\_naive\_bayes( self, data )
72 | \end{itemize}
73 |
74 | The SentimentAnalyzer uses the Naive Bayes classifier, that is included in the Natural Language toolkit, to classify tweets. It trains the classifier so that it can determine whether a tweet is positive, negative or neutral. The class opens up three different files, titled "tweets\_positive", "tweets\_negative", "tweets\_neutral", gets the text and places it in the classifier. The training data used that was manually categorized by the author and contains over 700 lines of words and sentences. The data was taken from Tweets harvested while creating the program and from football message boards. \\
75 |
76 | When doing an analysis the SentimentAnalyzer removes known stop-words, all links found and words that have less than 3 letters. It does so by calling the check\_word() function, for each word, to see if it should include the word or not.\\
77 |
78 | To use the SentimentAnalyzer one has to simply create an instance of it and send a list of tweets to the analyze() function which returns the list with each tweet classified.
79 |
80 | \clearpage
81 |
82 | \section{Class HTMLCreator} \label{sec:HTMLCreatorImplementation}
83 | FootballAnalyzer has the following functions:\\
84 |
85 | {\bf Public}
86 | \begin{itemize}
87 | \item create\_html( self )
88 | \end{itemize}
89 |
90 | {\bf Private}
91 | \begin{itemize}
92 | \item \_\_create\_stats\_info( self )
93 | \item \_\_create\_tweet\_list( self )
94 | \item \_\_create\_word\_cloud( self )
95 | \end{itemize}
96 |
97 | The HTMLCreator creates a HTML webpage that displays statistics, word cloud and a list of all tweets harvested. The class opens a html template which has all the markup for the webpage and stores it in a string. It takes the statistics given and puts them in a div element with the id "stats".\\
98 |
99 | The HTMLCreator then creates a word cloud of the 30 most frequent words in the tweets found by the aggregator, each word within a element with an appropriate css class and places them in the unordered list that has the class "word-cloud". The class for each word is determined by calculating how many times the word has appeared and scaled so that it is between 1 and 25.\\
100 |
101 | The class then creates a list of tweets on the webpage. The webpage shows three tweets per line and assigns each tweet with the class "left-tweets" or "right-tweets" depending on where it should be shown. It also creates an extra div element to color the background of each tweet, green, red or white depending on the results from the classification from the SentimentAnalyzer. \\
102 |
103 | A screenshot of the webpage can be seen in chapter 4.2.
--------------------------------------------------------------------------------
/Report/chapters/4_results.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | \chapter[Results]{Results}
3 | \label{chap:results}
4 |
5 |
6 | \section{Most Informative Features} \label{sec:MostInformativeFeatures}
7 |
8 | After training the Naive Bayes classifier with the manually categorized tweets and comments, the author
9 | asked the classifier to show the 20 most informative features for it to recognize whether some text
10 | should be classified positive, negative or neutral. Table 4.1 shows the results from the classifier. \\
11 |
12 | \begin{table}[h]
13 | \begin{center}
14 | \begin{tabular*}{10cm}{@{\extracolsep{\fill}} | r @{\hspace{1cm}} r @{\hspace{1cm}} l l r | }
15 | \hline
16 | \multicolumn{5}{|c|}{Most Informative Features} \\
17 | \hline
18 | 1 & starting = True & neu : pos & = & 21.5 : 1.0\\
19 | 2 & great = True & pos : neg & = & 19.9 : 1.0\\
20 | 3 & best = True & pos : neg & = & 12.8 : 1.0\\
21 | 4 & world = True & pos : neg & = & 12.4 : 1.0\\
22 | 5 & crossing = True & neu : pos & = & 7.2 : 1.0\\
23 | 6 & thought = True & pos : neg & = & 7.1 : 1.0\\
24 | 7 & player = True & neu : neg & = & 6.6 : 1.0\\
25 | 8 & class = True & pos : neg & = & 6.4 : 1.0\\
26 | 9 & shit = True & neg : pos & = & 6.2 : 1.0\\
27 | 10 & good = True & pos : neg & = & 5.1 : 1.0\\
28 | 11 & better = True & pos : neg & = & 4.9 : 1.0\\
29 | 12 & fucking = True & neg : pos & = & 4.4 : 1.0\\
30 | 13 & flicks = True & pos : neg & = & 3.4 : 1.0\\
31 | 14 & decision = True & neg : pos & = & 3.3 : 1.0\\
32 | 15 & even = True & neg : pos & = & 2.7 : 1.0\\
33 | 16 & much = True & neg : pos & = & 2.7 : 1.0\\
34 | 18 & can't = True & neg : pos & = & 2.7 : 1.0\\
35 | 19 & like = True & pos : neg & = & 2.6 : 1.0\\
36 | 20 & least = True & pos : neg & = & 2.6 : 1.0\\
37 | \hline
38 | \end{tabular*}
39 | \end{center}
40 | \caption{ Most informative features from the manually categorized tweets }
41 | \end{table}
42 |
43 | \newpage
44 | \section{Results webpage} \label{sec:ResultsWebpage}
45 |
46 | Below is a screenshot taken of the webpage created after running the program with the search parameters "MUFC Basel" which refer to the English team Manchester United Football Club and the Swiss football club Basel. \\
47 |
48 | \begin{figure}[h]
49 | \centering
50 | \includegraphics[width=400px]{images/webpage.png}
51 | \caption{ Screenshot of the results webpage }
52 | \label{fig:results}
53 | \end{figure}
54 |
55 | %To section \ref{sec:eqnom}
56 |
--------------------------------------------------------------------------------
/Report/chapters/appendix1.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | \chapter{ Poster for presentation }
3 | \label{chap:appendix1}
4 |
5 | A presentation was made for the project on the fifth of december in building 321. For the presentation it was required that the author made a presentation poster describing the program in a clear manner.\\
6 |
7 | Figure A.1 shows the poster that was created for that presentation. \\
8 |
9 | \begin{figure}[h]
10 | \centering
11 | \includegraphics[height=515px]{images/Poster.png}
12 | \caption{ Presentation poster }
13 | \label{fig:images_Poster}
14 | \end{figure}
15 |
16 | %To section \ref{sec:eqnom}
17 | \newpage
--------------------------------------------------------------------------------
/Report/command.shell:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/command.shell
--------------------------------------------------------------------------------
/Report/figure/OneNote Table Of Contents.onetoc2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/figure/OneNote Table Of Contents.onetoc2
--------------------------------------------------------------------------------
/Report/figure/dtu_A1_UK.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/figure/dtu_A1_UK.pdf
--------------------------------------------------------------------------------
/Report/figure/dtu_elektro_A_UK.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/figure/dtu_elektro_A_UK.pdf
--------------------------------------------------------------------------------
/Report/figure/dtu_informatics_A_UK-eps-converted-to.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/figure/dtu_informatics_A_UK-eps-converted-to.pdf
--------------------------------------------------------------------------------
/Report/figure/test2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/figure/test2.png
--------------------------------------------------------------------------------
/Report/figure/testfigure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/figure/testfigure.png
--------------------------------------------------------------------------------
/Report/images/ClassOverview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/images/ClassOverview.png
--------------------------------------------------------------------------------
/Report/images/Poster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/images/Poster.png
--------------------------------------------------------------------------------
/Report/images/webpage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/images/webpage.png
--------------------------------------------------------------------------------
/Report/master2010.aux:
--------------------------------------------------------------------------------
1 | \relax
2 | \select@language{english}
3 | \@writefile{toc}{\select@language{english}}
4 | \@writefile{lof}{\select@language{english}}
5 | \@writefile{lot}{\select@language{english}}
6 | \@writefile{toc}{\contentsline {chapter}{Table Of Contents}{i}}
7 | \newlabel{fancy:frontend}{{}{2}}
8 | \@writefile{toc}{\contentsline {chapter}{\numberline {1}Introduction}{2}}
9 | \@writefile{lof}{\addvspace {10\p@ }}
10 | \@writefile{lot}{\addvspace {10\p@ }}
11 | \newlabel{chap:Introduction}{{1}{2}}
12 | \@writefile{toc}{\contentsline {chapter}{\numberline {2}Design of the program}{3}}
13 | \@writefile{lof}{\addvspace {10\p@ }}
14 | \@writefile{lot}{\addvspace {10\p@ }}
15 | \newlabel{chap:design_of_the_program}{{2}{3}}
16 | \@writefile{toc}{\contentsline {section}{\numberline {2.1}Class FootballAnalyzer}{3}}
17 | \newlabel{sec:FootballAnalyzerDesign}{{2.1}{3}}
18 | \@writefile{toc}{\contentsline {section}{\numberline {2.2}Class TwitterAggregator}{3}}
19 | \newlabel{sec:TwitterAggregatorDesign}{{2.2}{3}}
20 | \@writefile{toc}{\contentsline {section}{\numberline {2.3}Class SentimentAnalyzer}{3}}
21 | \newlabel{sec:SentimentAnalyzerDesign}{{2.3}{3}}
22 | \@writefile{toc}{\contentsline {section}{\numberline {2.4}Class HTMLCreator}{4}}
23 | \newlabel{sec:HTMLCreatorDesign}{{2.4}{4}}
24 | \@writefile{toc}{\contentsline {section}{\numberline {2.5}Overview}{4}}
25 | \newlabel{sec:ClassOverview}{{2.5}{4}}
26 | \@writefile{lof}{\contentsline {figure}{\numberline {2.1}{\ignorespaces Class overview of the football analyzer \relax }}{4}}
27 | \providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
28 | \newlabel{fig:images_ClassOverview}{{2.1}{4}}
29 | \@writefile{toc}{\contentsline {chapter}{\numberline {3}Implementation}{5}}
30 | \@writefile{lof}{\addvspace {10\p@ }}
31 | \@writefile{lot}{\addvspace {10\p@ }}
32 | \newlabel{chap:Implementation}{{3}{5}}
33 | \@writefile{toc}{\contentsline {section}{\numberline {3.1}Class FootballAnalyzer}{5}}
34 | \newlabel{sec:FootballAnalyzerImplementation}{{3.1}{5}}
35 | \@writefile{toc}{\contentsline {section}{\numberline {3.2}Class TwitterAggregator}{6}}
36 | \newlabel{sec:TwitterAggregatorImplementation}{{3.2}{6}}
37 | \@writefile{toc}{\contentsline {section}{\numberline {3.3}Class SentimentAnalyzer}{7}}
38 | \newlabel{sec:SentimentAnalyzerImplementation}{{3.3}{7}}
39 | \@writefile{toc}{\contentsline {section}{\numberline {3.4}Class HTMLCreator}{8}}
40 | \newlabel{sec:HTMLCreatorImplementation}{{3.4}{8}}
41 | \@writefile{toc}{\contentsline {chapter}{\numberline {4}Results}{9}}
42 | \@writefile{lof}{\addvspace {10\p@ }}
43 | \@writefile{lot}{\addvspace {10\p@ }}
44 | \newlabel{chap:results}{{4}{9}}
45 | \@writefile{toc}{\contentsline {section}{\numberline {4.1}Most Informative Features}{9}}
46 | \newlabel{sec:MostInformativeFeatures}{{4.1}{9}}
47 | \@writefile{lot}{\contentsline {table}{\numberline {4.1}{\ignorespaces Most informative features from the manually categorized tweets \relax }}{9}}
48 | \@writefile{toc}{\contentsline {section}{\numberline {4.2}Results webpage}{10}}
49 | \newlabel{sec:ResultsWebpage}{{4.2}{10}}
50 | \@writefile{lof}{\contentsline {figure}{\numberline {4.1}{\ignorespaces Screenshot of the results webpage \relax }}{10}}
51 | \newlabel{fig:results}{{4.1}{10}}
52 | \@writefile{toc}{\contentsline {chapter}{Appendix}{11}}
53 | \@writefile{toc}{\contentsline {chapter}{\numberline {A} Poster for presentation }{11}}
54 | \@writefile{lof}{\addvspace {10\p@ }}
55 | \@writefile{lot}{\addvspace {10\p@ }}
56 | \newlabel{chap:appendix1}{{A}{11}}
57 | \@writefile{lof}{\contentsline {figure}{\numberline {A.1}{\ignorespaces Presentation poster \relax }}{12}}
58 | \newlabel{fig:images_Poster}{{A.1}{12}}
59 | \@writefile{toc}{\contentsline {chapter}{\numberline {B} Program source code }{13}}
60 | \@writefile{lof}{\addvspace {10\p@ }}
61 | \@writefile{lot}{\addvspace {10\p@ }}
62 | \newlabel{chap:appendix2}{{B}{13}}
63 | \@writefile{toc}{\contentsline {section}{\numberline {B.1}football\_analyzer.py}{13}}
64 | \newlabel{sec:FootballAnalyzer}{{B.1}{13}}
65 | \@writefile{toc}{\contentsline {section}{\numberline {B.2}twitter\_aggregator.py}{17}}
66 | \newlabel{sec:TwitterAggregator}{{B.2}{17}}
67 | \@writefile{toc}{\contentsline {section}{\numberline {B.3}sentiment\_analyzer.py}{22}}
68 | \newlabel{sec:SentimentAnalyzer}{{B.3}{22}}
69 | \@writefile{toc}{\contentsline {section}{\numberline {B.4}html\_creator.py}{26}}
70 | \newlabel{sec:HTMLCreator}{{B.4}{26}}
71 | \newlabel{fancy:mainend}{{B.4}{31}}
72 |
--------------------------------------------------------------------------------
/Report/master2010.bbl:
--------------------------------------------------------------------------------
1 | \begin{thebibliography}{1}
2 | \providecommand{\natexlab}[1]{#1}
3 | \providecommand{\url}[1]{\texttt{#1}}
4 | \expandafter\ifx\csname urlstyle\endcsname\relax
5 | \providecommand{\doi}[1]{doi: #1}\else
6 | \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi
7 |
8 | \bibitem[Kn{\"u}ppel(2008)]{knueppel2008}
9 | Thyge Kn{\"u}ppel.
10 | \newblock Structural analysis for fault detection and isolation in electrical
11 | distribution systems.
12 | \newblock Master's thesis, Technical University of Denmark, Department of
13 | Electrical Engineering, Centre for Eletric Technology and Section for
14 | Automation, April 2008.
15 | \newblock URL
16 | \url{http://www.elektro.dtu.dk/forskning/eltek/projekter_uddannelse/08/tk.as%
17 | px}.
18 |
19 | \end{thebibliography}
20 |
--------------------------------------------------------------------------------
/Report/master2010.blg:
--------------------------------------------------------------------------------
1 | This is BibTeX, Version 0.99cThe top-level auxiliary file: C:\Documents and Settings\Charlotte\My Documents\31MASTER\MIKTEXreport_2010_uk_dk\master2010.aux
2 | A level-1 auxiliary file: file/conclusion.aux
3 | The style file: plainnat.bst
4 | Database file #1: bibbase.bib
5 |
--------------------------------------------------------------------------------
/Report/master2010.lof:
--------------------------------------------------------------------------------
1 | \select@language {english}
2 | \addvspace {10\p@ }
3 | \addvspace {10\p@ }
4 | \addvspace {10\p@ }
5 |
--------------------------------------------------------------------------------
/Report/master2010.lot:
--------------------------------------------------------------------------------
1 | \select@language {english}
2 | \addvspace {10\p@ }
3 | \addvspace {10\p@ }
4 | \addvspace {10\p@ }
5 |
--------------------------------------------------------------------------------
/Report/master2010.nlo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/master2010.nlo
--------------------------------------------------------------------------------
/Report/master2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/master2010.pdf
--------------------------------------------------------------------------------
/Report/master2010.synctex.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/master2010.synctex.gz
--------------------------------------------------------------------------------
/Report/master2010.tcp:
--------------------------------------------------------------------------------
1 | [FormatInfo]
2 | Type=TeXnicCenterProjectInformation
3 | Version=4
4 |
5 | [ProjectInfo]
6 | MainFile=master2010.tex
7 | UseBibTeX=0
8 | UseMakeIndex=0
9 | ActiveProfile=LaTeX => PDF
10 | ProjectLanguage=de
11 | ProjectDialect=DE
12 |
13 |
--------------------------------------------------------------------------------
/Report/master2010.tex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/master2010.tex
--------------------------------------------------------------------------------
/Report/master2010.thm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/master2010.thm
--------------------------------------------------------------------------------
/Report/master2010.toc:
--------------------------------------------------------------------------------
1 | \select@language {english}
2 | \contentsline {chapter}{Table Of Contents}{i}
3 | \contentsline {chapter}{\numberline {1}Introduction}{2}
4 | \contentsline {chapter}{\numberline {2}Design of the program}{3}
5 | \contentsline {section}{\numberline {2.1}Class FootballAnalyzer}{3}
6 | \contentsline {section}{\numberline {2.2}Class TwitterAggregator}{3}
7 | \contentsline {section}{\numberline {2.3}Class SentimentAnalyzer}{3}
8 | \contentsline {section}{\numberline {2.4}Class HTMLCreator}{4}
9 | \contentsline {section}{\numberline {2.5}Overview}{4}
10 | \contentsline {chapter}{\numberline {3}Implementation}{5}
11 | \contentsline {section}{\numberline {3.1}Class FootballAnalyzer}{5}
12 | \contentsline {section}{\numberline {3.2}Class TwitterAggregator}{6}
13 | \contentsline {section}{\numberline {3.3}Class SentimentAnalyzer}{7}
14 | \contentsline {section}{\numberline {3.4}Class HTMLCreator}{8}
15 | \contentsline {chapter}{\numberline {4}Results}{9}
16 | \contentsline {section}{\numberline {4.1}Most Informative Features}{9}
17 | \contentsline {section}{\numberline {4.2}Results webpage}{10}
18 | \contentsline {chapter}{Appendix}{11}
19 | \contentsline {chapter}{\numberline {A} Poster for presentation }{11}
20 | \contentsline {chapter}{\numberline {B} Program source code }{13}
21 | \contentsline {section}{\numberline {B.1}football\_analyzer.py}{13}
22 | \contentsline {section}{\numberline {B.2}twitter\_aggregator.py}{17}
23 | \contentsline {section}{\numberline {B.3}sentiment\_analyzer.py}{22}
24 | \contentsline {section}{\numberline {B.4}html\_creator.py}{26}
25 |
--------------------------------------------------------------------------------
/Report/master2010.tps:
--------------------------------------------------------------------------------
1 | [FormatInfo]
2 | Type=TeXnicCenterProjectSessionInformation
3 | Version=2
4 |
5 | [SessionInfo]
6 | ActiveTab=0
7 | FrameCount=1
8 | ActiveFrame=0
9 |
10 | [Frame0]
11 | Columns=1
12 | Rows=1
13 | Flags=2
14 | ShowCmd=3
15 | MinPos.x=-1
16 | MinPos.y=-1
17 | MaxPos.x=-4
18 | MaxPos.y=-30
19 | NormalPos.left=0
20 | NormalPos.top=0
21 | NormalPos.right=864
22 | NormalPos.bottom=328
23 | Class=CLatexEdit
24 | Document=master2010.tex
25 |
26 | [Frame0_Row0]
27 | cyCur=449
28 | cyMin=10
29 |
30 | [Frame0_Col0]
31 | cxCur=957
32 | cxMin=10
33 |
34 | [Frame0_View0,0]
35 | Cursor.row=0
36 | Cursor.column=0
37 | TopSubLine=0
38 |
39 |
--------------------------------------------------------------------------------
/Report/nomencl.cfg:
--------------------------------------------------------------------------------
1 | \renewcommand{\nomname}{From cfg file MASTER}
2 |
3 | \renewcommand{\eqdeclaration}[1]{, first used in eq.~(#1)}
4 | \renewcommand{\nompreamble}{Start}
5 | \renewcommand{\nompostamble}{End}
6 |
7 |
8 | \renewcommand{\nomgroup}[1]{%
9 | \ifthenelse{\equal{#1}{D}}{\item[\textbf{Distributed}]\rule[2pt]{0.45\linewidth}{1pt}}{%
10 | \ifthenelse{\equal{#1}{G}}{\item[\textbf{Constants}]}{}}}
11 |
12 |
13 | % makeindex filename.nlo -s nomencl.ist -o filename.nls
14 | % makeindex master.nlo -s nomencl.ist -o master.nls
--------------------------------------------------------------------------------
/Report/style/Mythesis.sty:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % Here you can after-edit or specify details for your own thesis.
3 | % Remeber use "renew" or "addto" to avoid double-editing errors.
4 |
5 | % CET 2010 edited Charlotte K. Madsen
6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 |
8 | \ProvidesPackage{style/Mythesis}
9 |
10 | % Adjust captions to figure by \usepackage{caption}
11 | % (here) font=small and sans-serif (no feed), hang means no text under "`Figure nr", the last line is centered and the caption is in smaller than the textwidth (85%)
12 | \captionsetup{font={small,sf},labelfont=bf,format=hang,justification=centerlast,singlelinecheck=1,width=0.85\textwidth}
13 |
14 | %Adjust vertical space in tables
15 | %\renewcommand{\arraystretch}{1.2}
16 |
--------------------------------------------------------------------------------
/Report/style/thesisdef.log:
--------------------------------------------------------------------------------
1 | This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010) (format=latex 2010.11.30) 14 NOV 2011 23:14
2 | entering extended mode
3 | restricted \write18 enabled.
4 | file:line:error style messages enabled.
5 | %&-line parsing enabled.
6 | **thesisdef.sty
7 | (./thesisdef.sty
8 | LaTeX2e <2009/09/24>
9 | Babel and hyphenation patterns for english, dumylang, nohyphenation, ge
10 | rman-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, arabic, armenian
11 | , basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutch, u
12 | kenglish, usenglishmax, esperanto, estonian, farsi, finnish, french, galician,
13 | german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic, assamese,
14 | bengali, gujarati, hindi, kannada, malayalam, marathi, oriya, panjabi, tamil,
15 | telugu, indonesian, interlingua, irish, italian, kurmanji, lao, latin, latvian,
16 | lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, polish, portuguese, roma
17 | nian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish,
18 | turkmen, ukrainian, uppersorbian, welsh, loaded.
19 |
20 | LaTeX Warning: You have requested package `',
21 | but the package provides `style/thesisdef'.
22 |
23 | Package: style/thesisdef
24 |
25 | ./thesisdef.sty:15: LaTeX Error: \usepackage before \documentclass.
26 |
27 | See the LaTeX manual or LaTeX Companion for explanation.
28 | Type H for immediate help.
29 | ...
30 |
31 | l.15 \usepackage{
32 | amsmath,amssymb}
33 | \usepackage may only appear in the document preamble, i.e.,
34 | between \documentclass and \begin{document}.
35 |
36 |
37 | ./thesisdef.sty:16: LaTeX Error: \usepackage before \documentclass.
38 |
39 | See the LaTeX manual or LaTeX Companion for explanation.
40 | Type H for immediate help.
41 | ...
42 |
43 | l.16 \usepackage[amsmath,hyperref,thmmarks]{
44 | ntheorem}
45 | \usepackage may only appear in the document preamble, i.e.,
46 | between \documentclass and \begin{document}.
47 |
48 |
49 | ./thesisdef.sty:17: LaTeX Error: \usepackage before \documentclass.
50 |
51 | See the LaTeX manual or LaTeX Companion for explanation.
52 | Type H for immediate help.
53 | ...
54 |
55 | l.17 \usepackage[amsmath,thmmarks]{
56 | ntheorem}
57 | \usepackage may only appear in the document preamble, i.e.,
58 | between \documentclass and \begin{document}.
59 |
60 |
61 | ./thesisdef.sty:20: LaTeX Error: \usepackage before \documentclass.
62 |
63 | See the LaTeX manual or LaTeX Companion for explanation.
64 | Type H for immediate help.
65 | ...
66 |
67 | l.20 \usepackage{
68 | lmodern} %new 2009
69 | \usepackage may only appear in the document preamble, i.e.,
70 | between \documentclass and \begin{document}.
71 |
72 |
73 | ./thesisdef.sty:21: LaTeX Error: \usepackage before \documentclass.
74 |
75 | See the LaTeX manual or LaTeX Companion for explanation.
76 | Type H for immediate help.
77 | ...
78 |
79 | l.21 \usepackage[T1]{
80 | fontenc}
81 | \usepackage may only appear in the document preamble, i.e.,
82 | between \documentclass and \begin{document}.
83 |
84 |
85 | ./thesisdef.sty:22: LaTeX Error: \usepackage before \documentclass.
86 |
87 | See the LaTeX manual or LaTeX Companion for explanation.
88 | Type H for immediate help.
89 | ...
90 |
91 | l.22 \usepackage{
92 | textcomp} %new 2009
93 | \usepackage may only appear in the document preamble, i.e.,
94 | between \documentclass and \begin{document}.
95 |
96 |
97 | ./thesisdef.sty:27: LaTeX Error: \usepackage before \documentclass.
98 |
99 | See the LaTeX manual or LaTeX Companion for explanation.
100 | Type H for immediate help.
101 | ...
102 |
103 | l.27 \usepackage[english]{
104 | babel}
105 | \usepackage may only appear in the document preamble, i.e.,
106 | between \documentclass and \begin{document}.
107 |
108 |
109 | ./thesisdef.sty:30: LaTeX Error: \usepackage before \documentclass.
110 |
111 | See the LaTeX manual or LaTeX Companion for explanation.
112 | Type H for immediate help.
113 | ...
114 |
115 | l.30 \usepackage[latin1]{
116 | inputenc}
117 | \usepackage may only appear in the document preamble, i.e.,
118 | between \documentclass and \begin{document}.
119 |
120 |
121 | ./thesisdef.sty:31: LaTeX Error: \usepackage before \documentclass.
122 |
123 | See the LaTeX manual or LaTeX Companion for explanation.
124 | Type H for immediate help.
125 | ...
126 |
127 | l.31 \usepackage{
128 | verbatim}
129 | \usepackage may only appear in the document preamble, i.e.,
130 | between \documentclass and \begin{document}.
131 |
132 |
133 | ./thesisdef.sty:32: LaTeX Error: \usepackage before \documentclass.
134 |
135 | See the LaTeX manual or LaTeX Companion for explanation.
136 | Type H for immediate help.
137 | ...
138 |
139 | l.32 \usepackage{
140 | longtable}
141 | \usepackage may only appear in the document preamble, i.e.,
142 | between \documentclass and \begin{document}.
143 |
144 |
145 | ./thesisdef.sty:33: LaTeX Error: \usepackage before \documentclass.
146 |
147 | See the LaTeX manual or LaTeX Companion for explanation.
148 | Type H for immediate help.
149 | ...
150 |
151 | l.33 \usepackage{
152 | multirow}
153 | \usepackage may only appear in the document preamble, i.e.,
154 | between \documentclass and \begin{document}.
155 |
156 |
157 | ./thesisdef.sty:34: LaTeX Error: \usepackage before \documentclass.
158 |
159 | See the LaTeX manual or LaTeX Companion for explanation.
160 | Type H for immediate help.
161 | ...
162 |
163 | l.34 \usepackage{
164 | ifpdf}
165 | \usepackage may only appear in the document preamble, i.e.,
166 | between \documentclass and \begin{document}.
167 |
168 |
169 | ./thesisdef.sty:35: LaTeX Error: \usepackage before \documentclass.
170 |
171 | See the LaTeX manual or LaTeX Companion for explanation.
172 | Type H for immediate help.
173 | ...
174 |
175 | l.35 \usepackage{
176 | fancyhdr}
177 | \usepackage may only appear in the document preamble, i.e.,
178 | between \documentclass and \begin{document}.
179 |
180 |
181 | ./thesisdef.sty:38: LaTeX Error: \usepackage before \documentclass.
182 |
183 | See the LaTeX manual or LaTeX Companion for explanation.
184 | Type H for immediate help.
185 | ...
186 |
187 | l.38 \usepackage{
188 | rotating}%sideways envirenment
189 | \usepackage may only appear in the document preamble, i.e.,
190 | between \documentclass and \begin{document}.
191 |
192 |
193 | ./thesisdef.sty:39: LaTeX Error: \usepackage before \documentclass.
194 |
195 | See the LaTeX manual or LaTeX Companion for explanation.
196 | Type H for immediate help.
197 | ...
198 |
199 | l.39 \usepackage{
200 | lscape} %landscape
201 | \usepackage may only appear in the document preamble, i.e.,
202 | between \documentclass and \begin{document}.
203 |
204 |
205 | ./thesisdef.sty:40: LaTeX Error: \usepackage before \documentclass.
206 |
207 | See the LaTeX manual or LaTeX Companion for explanation.
208 | Type H for immediate help.
209 | ...
210 |
211 | l.40 \usepackage{
212 | psfrag,color} %laprint
213 | \usepackage may only appear in the document preamble, i.e.,
214 | between \documentclass and \begin{document}.
215 |
216 |
217 | ./thesisdef.sty:41: LaTeX Error: \usepackage before \documentclass.
218 |
219 | See the LaTeX manual or LaTeX Companion for explanation.
220 | Type H for immediate help.
221 | ...
222 |
223 | l.41 \usepackage{
224 | pstricks} %basic pstricks support
225 | \usepackage may only appear in the document preamble, i.e.,
226 | between \documentclass and \begin{document}.
227 |
228 |
229 | ./thesisdef.sty:44: LaTeX Error: \usepackage before \documentclass.
230 |
231 | See the LaTeX manual or LaTeX Companion for explanation.
232 | Type H for immediate help.
233 | ...
234 |
235 | l.44 \usepackage{
236 | curves} %curves in picture environment
237 | \usepackage may only appear in the document preamble, i.e.,
238 | between \documentclass and \begin{document}.
239 |
240 |
241 | ./thesisdef.sty:46: LaTeX Error: \usepackage before \documentclass.
242 |
243 | See the LaTeX manual or LaTeX Companion for explanation.
244 | Type H for immediate help.
245 | ...
246 |
247 | l.46 \usepackage[small,hang,bf,up]{
248 | caption}
249 | \usepackage may only appear in the document preamble, i.e.,
250 | between \documentclass and \begin{document}.
251 |
252 |
253 | ./thesisdef.sty:47: LaTeX Error: \usepackage before \documentclass.
254 |
255 | See the LaTeX manual or LaTeX Companion for explanation.
256 | Type H for immediate help.
257 | ...
258 |
259 | l.47 \usepackage[round,sort&compress]{
260 | natbib} % references. optional options
261 | \usepackage may only appear in the document preamble, i.e.,
262 | between \documentclass and \begin{document}.
263 |
264 |
265 | ./thesisdef.sty:48: LaTeX Error: \usepackage before \documentclass.
266 |
267 | See the LaTeX manual or LaTeX Companion for explanation.
268 | Type H for immediate help.
269 | ...
270 |
271 | l.48 \usepackage{
272 | url} %for list of references
273 | \usepackage may only appear in the document preamble, i.e.,
274 | between \documentclass and \begin{document}.
275 |
276 |
277 | ./thesisdef.sty:53: LaTeX Error: \usepackage before \documentclass.
278 |
279 | See the LaTeX manual or LaTeX Companion for explanation.
280 | Type H for immediate help.
281 | ...
282 |
283 | l.53 \usepackage[intoc,english,cfg]{
284 | nomencl}
285 | \usepackage may only appear in the document preamble, i.e.,
286 | between \documentclass and \begin{document}.
287 |
288 | ./thesisdef.sty:55: Undefined control sequence.
289 | l.55 \makenomenclature
290 |
291 | The control sequence at the end of the top line
292 | of your error message was never \def'ed. If you have
293 | misspelled it (e.g., `\hobx'), type `I' and the correct
294 | spelling (e.g., `I\hbox'). Otherwise just continue,
295 | and I'll forget about whatever was undefined.
296 |
297 |
298 | ./thesisdef.sty:62: LaTeX Error: \usepackage before \documentclass.
299 |
300 | See the LaTeX manual or LaTeX Companion for explanation.
301 | Type H for immediate help.
302 | ...
303 |
304 | l.62 \usepackage{
305 | listings}
306 | \usepackage may only appear in the document preamble, i.e.,
307 | between \documentclass and \begin{document}.
308 |
309 | ./thesisdef.sty:63: Undefined control sequence.
310 | l.63 \lstset
311 | {% general command to set parameter(s)
312 | The control sequence at the end of the top line
313 | of your error message was never \def'ed. If you have
314 | misspelled it (e.g., `\hobx'), type `I' and the correct
315 | spelling (e.g., `I\hbox'). Otherwise just continue,
316 | and I'll forget about whatever was undefined.
317 |
318 |
319 | ./thesisdef.sty:64: LaTeX Error: Missing \begin{document}.
320 |
321 | See the LaTeX manual or LaTeX Companion for explanation.
322 | Type H for immediate help.
323 | ...
324 |
325 | l.64 l
326 | anguage=Matlab, % definer inputsproget
327 | You're in trouble here. Try typing to proceed.
328 | If that doesn't work, type X to quit.
329 |
330 | Missing character: There is no l in font nullfont!
331 | Missing character: There is no a in font nullfont!
332 | Missing character: There is no n in font nullfont!
333 | Missing character: There is no g in font nullfont!
334 | Missing character: There is no u in font nullfont!
335 | Missing character: There is no a in font nullfont!
336 | Missing character: There is no g in font nullfont!
337 | Missing character: There is no e in font nullfont!
338 | Missing character: There is no = in font nullfont!
339 | Missing character: There is no M in font nullfont!
340 | Missing character: There is no a in font nullfont!
341 | Missing character: There is no t in font nullfont!
342 | Missing character: There is no l in font nullfont!
343 | Missing character: There is no a in font nullfont!
344 | Missing character: There is no b in font nullfont!
345 | Missing character: There is no , in font nullfont!
346 | Missing character: There is no b in font nullfont!
347 | Missing character: There is no a in font nullfont!
348 | Missing character: There is no s in font nullfont!
349 | Missing character: There is no i in font nullfont!
350 | Missing character: There is no c in font nullfont!
351 | Missing character: There is no s in font nullfont!
352 | Missing character: There is no t in font nullfont!
353 | Missing character: There is no y in font nullfont!
354 | Missing character: There is no l in font nullfont!
355 | Missing character: There is no e in font nullfont!
356 | Missing character: There is no = in font nullfont!
357 | ./thesisdef.sty:65: Undefined control sequence.
358 | l.65 basicstyle=\footnotesize
359 | , % print whole listin...
360 | The control sequence at the end of the top line
361 | of your error message was never \def'ed. If you have
362 | misspelled it (e.g., `\hobx'), type `I' and the correct
363 | spelling (e.g., `I\hbox'). Otherwise just continue,
364 | and I'll forget about whatever was undefined.
365 |
366 | Missing character: There is no , in font nullfont!
367 | Missing character: There is no k in font nullfont!
368 | Missing character: There is no e in font nullfont!
369 | Missing character: There is no y in font nullfont!
370 | Missing character: There is no w in font nullfont!
371 | Missing character: There is no o in font nullfont!
372 | Missing character: There is no r in font nullfont!
373 | Missing character: There is no d in font nullfont!
374 | Missing character: There is no s in font nullfont!
375 | Missing character: There is no t in font nullfont!
376 | Missing character: There is no y in font nullfont!
377 | Missing character: There is no l in font nullfont!
378 | Missing character: There is no e in font nullfont!
379 | Missing character: There is no = in font nullfont!
380 | LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <10> not available
381 | (Font) Font shape `OT1/cmtt/m/n' tried instead on input line 69.
382 | ./thesisdef.sty:72: Undefined control sequence.
383 | l.72 numberstyle=\tiny
384 | , % numbersize
385 | The control sequence at the end of the top line
386 | of your error message was never \def'ed. If you have
387 | misspelled it (e.g., `\hobx'), type `I' and the correct
388 | spelling (e.g., `I\hbox'). Otherwise just continue,
389 | and I'll forget about whatever was undefined.
390 |
391 |
392 | Overfull \hbox (20.0pt too wide) in paragraph at lines 64--78
393 | []
394 | []
395 |
396 |
397 | Overfull \hbox (3.19443pt too wide) in paragraph at lines 64--78
398 | \OT1/cmr/bx/n/10 ,
399 | []
400 |
401 |
402 | Overfull \hbox (25.07626pt too wide) in paragraph at lines 64--78
403 | \OT1/cmr/bx/n/10 iden-
404 | []
405 |
406 |
407 | Overfull \hbox (11.49994pt too wide) in paragraph at lines 64--78
408 | \OT1/cmr/bx/n/10 ti-
409 | []
410 |
411 |
412 | Overfull \hbox (20.22908pt too wide) in paragraph at lines 64--78
413 | \OT1/cmr/bx/n/10 fier-
414 | []
415 |
416 |
417 | Overfull \hbox (35.3623pt too wide) in paragraph at lines 64--78
418 | \OT1/cmr/bx/n/10 style=,
419 | []
420 |
421 |
422 | Overfull \hbox (24.27765pt too wide) in paragraph at lines 64--78
423 | \OT1/cmr/bx/n/10 com-
424 | []
425 |
426 |
427 | Overfull \hbox (60.75801pt too wide) in paragraph at lines 64--78
428 | \OT1/cmr/bx/n/10 mentstyle=,
429 | []
430 |
431 |
432 | Overfull \hbox (66.49545pt too wide) in paragraph at lines 64--78
433 | \OT1/cmr/bx/n/10 stringstyle=\OT1/cmtt/m/n/10 ,
434 | []
435 |
436 |
437 | Overfull \hbox (120.74895pt too wide) in paragraph at lines 64--78
438 | \OT1/cmtt/m/n/10 showstringspaces=false,
439 | []
440 |
441 |
442 | Overfull \hbox (68.2494pt too wide) in paragraph at lines 64--78
443 | \OT1/cmtt/m/n/10 numbers=left,
444 | []
445 |
446 |
447 | Overfull \hbox (68.2494pt too wide) in paragraph at lines 64--78
448 | \OT1/cmtt/m/n/10 numberstyle=,
449 | []
450 |
451 |
452 | Overfull \hbox (68.2494pt too wide) in paragraph at lines 64--78
453 | \OT1/cmtt/m/n/10 stepnumber=1,
454 | []
455 |
456 |
457 | Overfull \hbox (73.49936pt too wide) in paragraph at lines 64--78
458 | \OT1/cmtt/m/n/10 numbersep=5pt,
459 | []
460 |
461 |
462 | Overfull \hbox (99.74913pt too wide) in paragraph at lines 64--78
463 | \OT1/cmtt/m/n/10 extendedchars=true,
464 | []
465 |
466 |
467 | Overfull \hbox (83.99927pt too wide) in paragraph at lines 64--78
468 | \OT1/cmtt/m/n/10 breaklines=true,
469 | []
470 |
471 |
472 | Overfull \hbox (62.99945pt too wide) in paragraph at lines 64--78
473 | \OT1/cmtt/m/n/10 prebreak=...
474 | []
475 |
476 |
477 | ./thesisdef.sty:80: LaTeX Error: \usepackage before \documentclass.
478 |
479 | See the LaTeX manual or LaTeX Companion for explanation.
480 | Type H for immediate help.
481 | ...
482 |
483 | l.80 \usepackage{
484 | graphicx,subfig}
485 | \usepackage may only appear in the document preamble, i.e.,
486 | between \documentclass and \begin{document}.
487 |
488 |
489 | ./thesisdef.sty:106: LaTeX Error: \usepackage before \documentclass.
490 |
491 | See the LaTeX manual or LaTeX Companion for explanation.
492 | Type H for immediate help.
493 | ...
494 |
495 | l.106 \usepackage[plainpages=false]{
496 | hyperref}%
497 | \usepackage may only appear in the document preamble, i.e.,
498 | between \documentclass and \begin{document}.
499 |
500 |
501 | ./thesisdef.sty:107: LaTeX Error: \usepackage before \documentclass.
502 |
503 | See the LaTeX manual or LaTeX Companion for explanation.
504 | Type H for immediate help.
505 | ...
506 |
507 | l.107 \usepackage{
508 | breakurl}%
509 | \usepackage may only appear in the document preamble, i.e.,
510 | between \documentclass and \begin{document}.
511 |
512 | ./thesisdef.sty:110: Undefined control sequence.
513 | l.110 \hypersetup
514 | {pdftitle={\ThesisTitle},
515 | The control sequence at the end of the top line
516 | of your error message was never \def'ed. If you have
517 | misspelled it (e.g., `\hobx'), type `I' and the correct
518 | spelling (e.g., `I\hbox'). Otherwise just continue,
519 | and I'll forget about whatever was undefined.
520 |
521 |
522 | ./thesisdef.sty:110: LaTeX Error: Missing \begin{document}.
523 |
524 | See the LaTeX manual or LaTeX Companion for explanation.
525 | Type H for immediate help.
526 | ...
527 |
528 | l.110 \hypersetup{p
529 | dftitle={\ThesisTitle},
530 | You're in trouble here. Try typing to proceed.
531 | If that doesn't work, type X to quit.
532 |
533 | Missing character: There is no p in font nullfont!
534 | Missing character: There is no d in font nullfont!
535 | Missing character: There is no f in font nullfont!
536 | Missing character: There is no t in font nullfont!
537 | Missing character: There is no i in font nullfont!
538 | Missing character: There is no t in font nullfont!
539 | Missing character: There is no l in font nullfont!
540 | Missing character: There is no e in font nullfont!
541 | Missing character: There is no = in font nullfont!
542 | ./thesisdef.sty:110: Undefined control sequence.
543 | l.110 \hypersetup{pdftitle={\ThesisTitle
544 | },
545 | The control sequence at the end of the top line
546 | of your error message was never \def'ed. If you have
547 | misspelled it (e.g., `\hobx'), type `I' and the correct
548 | spelling (e.g., `I\hbox'). Otherwise just continue,
549 | and I'll forget about whatever was undefined.
550 |
551 | Missing character: There is no , in font nullfont!
552 | Missing character: There is no p in font nullfont!
553 | Missing character: There is no d in font nullfont!
554 | Missing character: There is no f in font nullfont!
555 | Missing character: There is no a in font nullfont!
556 | Missing character: There is no u in font nullfont!
557 | Missing character: There is no t in font nullfont!
558 | Missing character: There is no h in font nullfont!
559 | Missing character: There is no o in font nullfont!
560 | Missing character: There is no r in font nullfont!
561 | Missing character: There is no = in font nullfont!
562 | ./thesisdef.sty:111: Undefined control sequence.
563 | l.111 ... pdfauthor={\ThesisAuthorForHyperref
564 | },%
565 | The control sequence at the end of the top line
566 | of your error message was never \def'ed. If you have
567 | misspelled it (e.g., `\hobx'), type `I' and the correct
568 | spelling (e.g., `I\hbox'). Otherwise just continue,
569 | and I'll forget about whatever was undefined.
570 |
571 | Missing character: There is no , in font nullfont!
572 | Missing character: There is no p in font nullfont!
573 | Missing character: There is no d in font nullfont!
574 | Missing character: There is no f in font nullfont!
575 | Missing character: There is no s in font nullfont!
576 | Missing character: There is no u in font nullfont!
577 | Missing character: There is no b in font nullfont!
578 | Missing character: There is no j in font nullfont!
579 | Missing character: There is no e in font nullfont!
580 | Missing character: There is no c in font nullfont!
581 | Missing character: There is no t in font nullfont!
582 | Missing character: There is no = in font nullfont!
583 | ./thesisdef.sty:112: Undefined control sequence.
584 | l.112 pdfsubject={\thesissubject
585 | }, %
586 | The control sequence at the end of the top line
587 | of your error message was never \def'ed. If you have
588 | misspelled it (e.g., `\hobx'), type `I' and the correct
589 | spelling (e.g., `I\hbox'). Otherwise just continue,
590 | and I'll forget about whatever was undefined.
591 |
592 | Missing character: There is no , in font nullfont!
593 | Missing character: There is no p in font nullfont!
594 | Missing character: There is no d in font nullfont!
595 | Missing character: There is no f in font nullfont!
596 | Missing character: There is no k in font nullfont!
597 | Missing character: There is no e in font nullfont!
598 | Missing character: There is no y in font nullfont!
599 | Missing character: There is no w in font nullfont!
600 | Missing character: There is no o in font nullfont!
601 | Missing character: There is no r in font nullfont!
602 | Missing character: There is no d in font nullfont!
603 | Missing character: There is no s in font nullfont!
604 | Missing character: There is no = in font nullfont!
605 | ./thesisdef.sty:113: Undefined control sequence.
606 | l.113 pdfkeywords={\thesiskeywords
607 | },%
608 | The control sequence at the end of the top line
609 | of your error message was never \def'ed. If you have
610 | misspelled it (e.g., `\hobx'), type `I' and the correct
611 | spelling (e.g., `I\hbox'). Otherwise just continue,
612 | and I'll forget about whatever was undefined.
613 |
614 | Missing character: There is no , in font nullfont!
615 | Missing character: There is no c in font nullfont!
616 | Missing character: There is no o in font nullfont!
617 | Missing character: There is no l in font nullfont!
618 | Missing character: There is no o in font nullfont!
619 | Missing character: There is no r in font nullfont!
620 | Missing character: There is no l in font nullfont!
621 | Missing character: There is no i in font nullfont!
622 | Missing character: There is no n in font nullfont!
623 | Missing character: There is no k in font nullfont!
624 | Missing character: There is no s in font nullfont!
625 | Missing character: There is no , in font nullfont!
626 | Missing character: There is no l in font nullfont!
627 | Missing character: There is no i in font nullfont!
628 | Missing character: There is no n in font nullfont!
629 | Missing character: There is no k in font nullfont!
630 | Missing character: There is no c in font nullfont!
631 | Missing character: There is no o in font nullfont!
632 | Missing character: There is no l in font nullfont!
633 | Missing character: There is no o in font nullfont!
634 | Missing character: There is no r in font nullfont!
635 | Missing character: There is no = in font nullfont!
636 | Missing character: There is no r in font nullfont!
637 | Missing character: There is no e in font nullfont!
638 | Missing character: There is no d in font nullfont!
639 | Missing character: There is no , in font nullfont!
640 | Missing character: There is no c in font nullfont!
641 | Missing character: There is no i in font nullfont!
642 | Missing character: There is no t in font nullfont!
643 | Missing character: There is no e in font nullfont!
644 | Missing character: There is no c in font nullfont!
645 | Missing character: There is no o in font nullfont!
646 | Missing character: There is no l in font nullfont!
647 | Missing character: There is no o in font nullfont!
648 | Missing character: There is no r in font nullfont!
649 | Missing character: There is no = in font nullfont!
650 | Missing character: There is no b in font nullfont!
651 | Missing character: There is no l in font nullfont!
652 | Missing character: There is no u in font nullfont!
653 | Missing character: There is no e in font nullfont!
654 | Missing character: There is no , in font nullfont!
655 | Missing character: There is no b in font nullfont!
656 | Missing character: There is no r in font nullfont!
657 | Missing character: There is no e in font nullfont!
658 | Missing character: There is no a in font nullfont!
659 | Missing character: There is no k in font nullfont!
660 | Missing character: There is no l in font nullfont!
661 | Missing character: There is no i in font nullfont!
662 | Missing character: There is no n in font nullfont!
663 | Missing character: There is no k in font nullfont!
664 | Missing character: There is no s in font nullfont!
665 | Missing character: There is no , in font nullfont!
666 | Missing character: There is no l in font nullfont!
667 | Missing character: There is no i in font nullfont!
668 | Missing character: There is no n in font nullfont!
669 | Missing character: There is no k in font nullfont!
670 | Missing character: There is no t in font nullfont!
671 | Missing character: There is no o in font nullfont!
672 | Missing character: There is no c in font nullfont!
673 | Missing character: There is no p in font nullfont!
674 | Missing character: There is no a in font nullfont!
675 | Missing character: There is no g in font nullfont!
676 | Missing character: There is no e in font nullfont!
677 | Missing character: There is no , in font nullfont!
678 | Missing character: There is no b in font nullfont!
679 | Missing character: There is no o in font nullfont!
680 | Missing character: There is no o in font nullfont!
681 | Missing character: There is no k in font nullfont!
682 | Missing character: There is no m in font nullfont!
683 | Missing character: There is no a in font nullfont!
684 | Missing character: There is no r in font nullfont!
685 | Missing character: There is no k in font nullfont!
686 | Missing character: There is no s in font nullfont!
687 | Missing character: There is no o in font nullfont!
688 | Missing character: There is no p in font nullfont!
689 | Missing character: There is no e in font nullfont!
690 | Missing character: There is no n in font nullfont!
691 | Missing character: There is no , in font nullfont!
692 | Missing character: There is no b in font nullfont!
693 | Missing character: There is no o in font nullfont!
694 | Missing character: There is no o in font nullfont!
695 | Missing character: There is no k in font nullfont!
696 | Missing character: There is no m in font nullfont!
697 | Missing character: There is no a in font nullfont!
698 | Missing character: There is no r in font nullfont!
699 | Missing character: There is no k in font nullfont!
700 | Missing character: There is no s in font nullfont!
701 | Missing character: There is no o in font nullfont!
702 | Missing character: There is no p in font nullfont!
703 | Missing character: There is no e in font nullfont!
704 | Missing character: There is no n in font nullfont!
705 | Missing character: There is no l in font nullfont!
706 | Missing character: There is no e in font nullfont!
707 | Missing character: There is no v in font nullfont!
708 | Missing character: There is no e in font nullfont!
709 | Missing character: There is no l in font nullfont!
710 | Missing character: There is no = in font nullfont!
711 | Missing character: There is no 1 in font nullfont!
712 | Missing character: There is no , in font nullfont!
713 | Missing character: There is no b in font nullfont!
714 | Missing character: There is no o in font nullfont!
715 | Missing character: There is no o in font nullfont!
716 | Missing character: There is no k in font nullfont!
717 | Missing character: There is no m in font nullfont!
718 | Missing character: There is no a in font nullfont!
719 | Missing character: There is no r in font nullfont!
720 | Missing character: There is no k in font nullfont!
721 | Missing character: There is no s in font nullfont!
722 | Missing character: There is no n in font nullfont!
723 | Missing character: There is no u in font nullfont!
724 | Missing character: There is no m in font nullfont!
725 | Missing character: There is no b in font nullfont!
726 | Missing character: There is no e in font nullfont!
727 | Missing character: There is no r in font nullfont!
728 | Missing character: There is no e in font nullfont!
729 | Missing character: There is no d in font nullfont!
730 | ./thesisdef.sty:122: Extra \else.
731 | l.122 \else
732 |
733 | I'm ignoring this; it doesn't match any \if.
734 |
735 | ./thesisdef.sty:127: Extra \fi.
736 | l.127 \fi
737 |
738 | I'm ignoring this; it doesn't match any \if.
739 |
740 |
741 | Overfull \hbox (20.0pt too wide) in paragraph at lines 110--128
742 | []
743 | []
744 |
745 |
746 | ./thesisdef.sty:131: LaTeX Error: \usepackage before \documentclass.
747 |
748 | See the LaTeX manual or LaTeX Companion for explanation.
749 | Type H for immediate help.
750 | ...
751 |
752 | l.131 \usepackage{
753 | algorithm,algorithmic}
754 | \usepackage may only appear in the document preamble, i.e.,
755 | between \documentclass and \begin{document}.
756 |
757 | )
758 | ! Emergency stop.
759 | <*> thesisdef.sty
760 |
761 | *** (job aborted, no legal \end found)
762 |
763 |
764 | Here is how much of TeX's memory you used:
765 | 23 strings out of 493748
766 | 309 string characters out of 3143568
767 | 49070 words of memory out of 3000000
768 | 3412 multiletter control sequences out of 15000+200000
769 | 4116 words of font info for 16 fonts, out of 3000000 for 9000
770 | 714 hyphenation exceptions out of 8191
771 | 16i,1n,11p,115b,91s stack positions out of 5000i,500n,10000p,200000b,50000s
772 | No pages of output.
773 |
--------------------------------------------------------------------------------
/Report/style/thesisdef.sty:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % Loads all the packages and the options
3 | % Should only be edited with carefull hand!
4 | % CET 2010 edited Charlotte K. Madsen
5 |
6 |
7 | %%%%%%%%%%%%%%%% do NOT modify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 | \def\danishlang{da}
9 | \def\printversion{final}
10 | \def\netversion{yes}
11 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 | \ProvidesPackage{style/thesisdef}
13 |
14 | % ams math
15 | \usepackage{amsmath,amssymb}
16 | \usepackage[amsmath,hyperref,thmmarks]{ntheorem}
17 | \usepackage[amsmath,thmmarks]{ntheorem}
18 |
19 | % better fonts in pdf-versions
20 | \usepackage{lmodern} %new 2009
21 | \usepackage[T1]{fontenc}
22 | \usepackage{textcomp} %new 2009
23 |
24 | \usepackage[english]{babel}
25 |
26 | \usepackage[latin1]{inputenc}
27 | \usepackage{verbatim}
28 | \usepackage{longtable}
29 | \usepackage{multirow}
30 | \usepackage{ifpdf}
31 | \usepackage{fancyhdr}
32 | %\usepackage{lastpage} % for page xx of \pageref{LastPage}
33 |
34 | \usepackage{rotating}%sideways envirenment
35 | \usepackage{lscape} %landscape
36 | \usepackage{psfrag,color} %laprint
37 | \usepackage{pstricks} %basic pstricks support
38 | %\usepackage{pst-node,pst-text,pst-grad,pst-circ,gastex} %advanced features
39 | %(unsure if they work with pdflatex)
40 | \usepackage{curves} %curves in picture environment
41 |
42 | \usepackage[small,hang,bf,up]{caption}
43 | \usepackage[round,sort&compress]{natbib} % references. optional options
44 | \usepackage{url} %for list of references
45 |
46 | \ifx\thesislanguage\danishlang
47 | \usepackage[intoc,danish,cfg]{nomencl}
48 | \else
49 | \usepackage[intoc,english,cfg]{nomencl}
50 | \fi
51 | \makenomenclature
52 | \newcommand{\nomunit}[1]{%
53 | \renewcommand{\nomentryend}{\hspace*{\fill}#1}}
54 |
55 |
56 |
57 | % input files/scripts
58 | \usepackage{listings}
59 | \lstset{% general command to set parameter(s)
60 | language=Matlab, % definer inputsproget
61 | basicstyle=\footnotesize, % print whole listing small
62 | keywordstyle=\bfseries, % underlined bold black keywords
63 | identifierstyle=, % nothing happens
64 | commentstyle=, % white comments
65 | stringstyle=\ttfamily, % typewriter type for strings
66 | showstringspaces=false, % no special string spaces
67 | numbers=left, % side for linenumbers
68 | numberstyle=\tiny, % numbersize
69 | stepnumber=1, % steps in numbering
70 | numbersep=5pt, % distance to listings
71 | extendedchars=true, % danske tegn
72 | breaklines=true, % auto. linjeskift
73 | prebreak=...} % indiker linjeskift med...
74 |
75 | %\usepackage{mcode}
76 | \usepackage{graphicx,subfig}
77 |
78 | % LEVEL : An entry is produced only if LEVEL < or = value of
79 | % 'tocdepth' counter. Note, \chapter is level 0, \section
80 | % is level 1, etc.
81 | \setcounter{tocdepth}{2}
82 | \setcounter{secnumdepth}{3}
83 |
84 |
85 | %prevent a single word from occupying a whole page
86 | %\clubpenalty=9999
87 | %\widowpenalty=9999
88 |
89 | %change margin locally to insert wide figures
90 | \def\quote{\list{}{\rightmargin\leftmargin}\item[]}
91 | \let\endquote=\endlist
92 | \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
93 | \let\endchangemargin=\endlist
94 | %\begin{changemargin}{-1cm}{.5cm} "wide figure or table" \end{changemargin}
95 |
96 |
97 | % Links on/off for netversion
98 | \ifx\thesislinks\netversion
99 | \ifpdf
100 | \usepackage[plainpages=false,pdftex]{hyperref} %theseoptions may be necessary for pdflatex
101 | \else%
102 | \usepackage[plainpages=false]{hyperref}%
103 | \usepackage{breakurl}%
104 | \fi
105 | %
106 | \hypersetup{pdftitle={\ThesisTitle},
107 | pdfauthor={\ThesisAuthorForHyperref},%
108 | pdfsubject={\thesissubject}, %
109 | pdfkeywords={\thesiskeywords},%
110 | colorlinks,%
111 | linkcolor=red,%
112 | citecolor=blue,%
113 | breaklinks,%
114 | linktocpage,%
115 | bookmarksopen,%
116 | bookmarksopenlevel=1,%
117 | bookmarksnumbered}%
118 | \else
119 | %\hypersetup{colorlinks,%
120 | % linkcolor=black,%
121 | % citecolor=black,}%
122 | \newcommand{\phantomsection}{}
123 | \fi
124 |
125 | %NOTE algorithm MUST be loaded after hyperref or things DO break!!
126 | %The counter for algorithms is not recognized by hyperref.
127 | \usepackage{algorithm,algorithmic}
128 |
129 |
--------------------------------------------------------------------------------
/Report/style/thesislayout.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/style/thesislayout.log
--------------------------------------------------------------------------------
/Report/style/thesislayout.sty:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ellioman/Twitter-Sentiment-Analysis/e6ea4390897be68214b70c875cee205c1461630c/Report/style/thesislayout.sty
--------------------------------------------------------------------------------