More general _f_score function + comments by rphlypo.