Added to utils a function to calculate precision, recall, and f-measure.