#!/usr/bin/perl

use strict;

my($dist_prev) = 0;

while (<>) {
	chomp($_);
	my($dist, $score) = (/^(\d+)\s(.+)/);
	printf("
metrics['default']['R_PARTS_DIFFER_%s_%s'] = { weight = %s, description = 'Text and HTML parts differ' }
reconf['R_PARTS_DIFFER_%s_%s'] = 'compare_parts_distance(%s, %s)';
", $dist_prev, $dist, $score, $dist_prev, $dist, $dist_prev, $dist);
	$dist_prev = $dist;
}
