Package miopia :: Package analyzer :: Module SentimentInfo
[hide private]
[frames] | no frames]

Source Code for Module miopia.analyzer.SentimentInfo

 1  ''' 
 2  @author: David Vilares 
 3  ''' 
 4   
5 -class SentimentInfo(object):
6 7 8 ''' 9 SentimentInfo stores relevant information about a branch of a L{SentimentDependencyGraph} 10 ''' 11 12
13 - def __init__(self,intensifier,so, subjectivity,pos_words,neg_words, 14 number_intensifiers, length_text, number_words):
15 ''' 16 Constructor 17 @param intensifier: A float. It indicates the degree of intensification 18 @param so: A float. It indicates the Semantic Orientation 19 @param subjectivity: A boolean. True if node has subjectivity, False otherwise 20 @param pos_words: An integer. The number of positive words. 21 @param neg_words: An integer. The number of negative words. 22 @param number_intensifiers: An integer. The number of intensifiers. 23 @param length_text: An integer. The length of the text (in that node) 24 @param number_words: An integer. The number of words. 25 ''' 26 self._intensifier = intensifier 27 self._so = so 28 self._subjectivity = subjectivity 29 self._pos_words = pos_words 30 self._neg_words = neg_words 31 self._number_intensifiers = number_intensifiers 32 self._length_text = length_text 33 self._number_words = number_words
34 35 36
37 - def get_int(self):
38 return self._intensifier
39
40 - def get_so(self):
41 return self._so
42
43 - def get_subjectivity(self):
44 return self._subjectivity
45
46 - def set_pos_words(self,pos_words):
47 self._pos_words = pos_words
48
49 - def get_pos_words(self):
50 return self._pos_words
51
52 - def set_neg_words(self, neg_words):
53 self._neg_words = neg_words
54
55 - def get_neg_words(self):
56 return self._neg_words
57
58 - def get_number_intensifiers(self):
59 return self._number_intensifiers
60
61 - def get_length_text(self):
62 return self._length_text
63
64 - def get_number_words(self):
65 return self._number_words
66