1 '''
2 Created on 14/02/2013
3
4 @author: David Vilares Calvo
5 '''
6
8 '''
9 AnalyzerConfiguration sets the configuration of a L{SentimentAnalyzer}
10 '''
11
12
13 - def __init__(self,final_sentences_weight=1.75, caps_int=0.1,
14 replication_int=0.25, restrictive_adv_weight=0.75,
15 restrictive_main_weight=1.4, without_shift = 3.55,
16 neg_shift=4):
17 '''
18 Constructor
19 @param final_sentence_weight: A float. The weighting factor for final sentences.
20 @param caps_int: A float. The weighting factor for capitalized words.
21 @param replication_int: A float. The weighting factor for words with replicated characters.
22 @param restrictive_adv_weight: A float. The weighting factor for adversative subordinate clause.
23 @param restrictive_main_weight: A float. The weighting factor for the main sentence of a subordinate clause.
24 @param without_shift: A float. The shift value to negate 'sin' ('without') phrases.
25 @param neg_shift: A float. The shift value value to negate 'no' ('not') and 'nunca' ('never') phrases.
26 '''
27 self._final_sentences_weight = final_sentences_weight
28 self._caps_int = caps_int
29 self._replication_int=replication_int
30 self._restrictive_adv_weight=restrictive_adv_weight
31 self._restrictive_main_weight=restrictive_main_weight
32 self._without_weight=without_shift
33 self._neg_weight=neg_shift
34
35
36
38 return self._final_sentences_weight
39
42
44 return self._replication_int
45
47 return self._restrictive_adv_weight
48
50 return self._restrictive_main_weight
51
53 return self._without_weight
54
56 return self._neg_weight
57