1 '''
2 @author: David Vilares
3 '''
4
5 from collections import defaultdict
6
7
9 '''
10 It describes the phemonona supported by the class L{LexicalSentimentInfo}
11 '''
12 REPLICATION = "REPLICATION"
13 CAPS = "CAPS"
14
15
17
18 '''
19 This class stores auxiliary information about the no preprocessed text
20 that could be useful in next steps
21 '''
23 '''
24 Constructor
25 '''
26
27 self._dict = defaultdict(defaultdict)
28
29
32 try:
33 self._dict[id_sentence][id_token].append(type_valence_shifter)
34 except KeyError:
35 self._dict[id_sentence][id_token] = [type_valence_shifter]
36
37
40
42 try:
43 return self._dict[id_sentence]
44 except:
45 return None
46
47
49 try:
50 return self._dict[id_sentence][id_token]
51 except:
52 return None
53