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

Source Code for Module miopia.adapter.ScorerAdapter

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