Commit d167b7be authored by Vít Novotný's avatar Vít Novotný
Browse files

Do not expect `category_map` to know all categories in `GROUPS.values()`

parent b400288e
Pipeline #147292 passed with stage
in 9 minutes and 24 seconds
......@@ -53,7 +53,12 @@ class AggregateMeanFScoreEvaluator(TokenClassificationEvaluator):
def get_f_score(self, group: Group, expected_labels: List[Category],
actual_labels: List[Category]) -> FScore:
expected_categories: Set[Category] = {self.category_map[category] for category in group}
expected_categories: Set[Category] = {
for category
in group
if category in self.category_map
true_positives, false_positives, false_negatives = 0, 0, 0
for expected_label, actual_label in zip_equal(expected_labels, actual_labels):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment