Пример #1
0
 def total_distance(self, input_pairs):
     """ Handle the 'dist' output specially (just sum up distances). """
     if self.options['output'] == 'dist':
         # Do the normal (non-f-score) metric thing of summing up all vals
         return DistanceMetric.total_distance(self, input_pairs)
     else:
         return FScoreMetric.total_distance(self, input_pairs)
Пример #2
0
 def format_distance(self, dist):
     if self.options['output'] == 'dist':
         return "%f" % dist
     else:
         return FScoreMetric.format_distance(self, dist)