1 '''
2 Created on 25/09/2013
3
4 @author: David Vilares
5 '''
6
7 from miopia.adapter.Feature import FeatureType
8 from miopia.adapter.RawAdapter import RawAdapter
9 from miopia.analyzer.counter.NGramCounter import NGramCounter
10
12 '''
13 A WEKA adapter for L{NGramCounter}
14 '''
15
16
17 - def __init__(self,path_weka, ngram_counter, weight_factor):
18 """
19 @param path_weka: The path to the WEKA.jar
20 @param abstracted_lexicons_counter: An instance of L{NGramCounter}
21 @param weight_factor: A value {BINARY_WEIGHTING_FACTOR, TOTAL_WEIGHTING_FACTOR}
22 """
23
24
25 if not isinstance(ngram_counter,NGramCounter):
26 raise ValueError
27
28 super(NGramAdapter,self).__init__(path_weka,ngram_counter,weight_factor)
29
30
36