Package miopia :: Package adapter :: Module AbstractedLexiconsAdapter
[hide private]
[frames] | no frames]

Source Code for Module miopia.adapter.AbstractedLexiconsAdapter

 1  ''' 
 2  Created on 14/03/2014 
 3   
 4  @author: david.vilares 
 5  ''' 
 6   
 7   
 8  from miopia.adapter.RawAdapter import RawAdapter 
 9  from miopia.adapter.Feature import FeatureType 
10  from miopia.analyzer.counter.AbstractedLexiconsCounter import AbstractedLexiconsCounter 
11   
12 -class AbstractedLexiconsAdapter(RawAdapter):
13 ''' 14 A WEKA adapter for L{AbstractedLexiconsCounter} 15 ''' 16
17 - def __init__(self,path_weka, abstracted_lexicons_counter, weight_factor):
18 ''' 19 @param path_weka: The path to the WEKA.jar 20 @param abstracted_lexicons_counter: An instance of L{AbstractedLexiconsCounter} 21 @param weight_factor: A value {BINARY_WEIGHTING_FACTOR, TOTAL_WEIGHTING_FACTOR} 22 ''' 23 24 if not isinstance(abstracted_lexicons_counter, AbstractedLexiconsCounter): 25 raise ValueError 26 super(AbstractedLexiconsAdapter,self).__init__(path_weka,abstracted_lexicons_counter,weight_factor)
27 28
29 - def _get_feature_type(self):
30 """ 31 @return the type of the feature 32 """ 33 return FeatureType.ABSTRACTED_LEXICON
34