1 '''
2 Created on Jun 24, 2011
3
4 @author: Eleftherios Avramidis
5 '''
6
7 from featuregenerator import FeatureGenerator
8
10 '''
11 classdocs
12 '''
13
14
15 - def __init__(self, critical_feature, critical_function):
16 '''
17 Constructor
18 '''
19 self.critical_feature = critical_feature
20 self.critical_function = critical_function
21
22
24 value_per_system = [float(tgt.get_attribute(self.critical_feature)) for tgt in ps.get_translations()]
25 min_wer = min(value_per_system)
26 best_systems = []
27 id = 0
28 for wer_value in value_per_system:
29 id += 1
30 if wer_value == min_wer:
31 best_systems.append(id)
32 if best_systems > 1:
33
34 print "maybe more than one best systems according to %s" % self.critical_function.__class__.__name__
35
36 return {'best': str(best_systems[0])}
37