Refactoring, extending the non-boolean approach.

Boolean and non-boolean produce the same result.
(101 - 302) Precision: 92.3%, Recall: 25.5%, F-measure: 40.0%