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