Package miopia :: Package analyzer :: Package counter :: Module LexiconCounter :: Class LexiconCounter
[hide private]
[frames] | no frames]

Class LexiconCounter

source code

       object --+        
                |        
  Counter.Counter --+    
                    |    
RawCounter.RawCounter --+
                        |
                       LexiconCounter
Known Subclasses:

Abstract class to manage counters which use external knowledge to obtain features for the supervised classifier.

Instance Methods [hide private]
 
__init__(self, ftc, preprocessor, lexical_processor, dict_lexicon, lowercase=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_count(self, list_text_info) source code
 
_is_terminal_value(self, dict_expressions, list_token_info) source code
 
_find_values(self, textid, token_info, sublist_token_info, initial_position, current_position, subdictionary) source code

Inherited from RawCounter.RawCounter: raw_processing

Inherited from RawCounter.RawCounter (private): _filter

Inherited from Counter.Counter: count, file_id, get_feature_type_configuration, name_from_id

Inherited from Counter.Counter (private): _id_of_feature

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from Counter.Counter: BINARY, TOTAL

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ftc, preprocessor, lexical_processor, dict_lexicon, lowercase=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • ftc - An instance of FeatureTypeConfiguration
  • preprocessor - An instance of PreprocessorI
  • lexical_processor - An instance of LexicalProcessor
  • dict_lexicon - A nested dictionary {key:[Category,{key:[ ... ]}]}
  • lowercase - A boolean. True to ignore capitalised characters.
Overrides: object.__init__

_count(self, list_text_info)

source code 
Parameters:
  • list_text_info - A list of TextInfo objects
Overrides: RawCounter.RawCounter._count