Measuring and repairing inconsistency in knowledge bases with graded truth