langtest.utils.util_metrics.combine_labels#
- combine_labels(labels: List[str]) List[str] #
Combine labels by removing the BIO tags and keeping only the entity type.
- Parameters:
labels (List[str]) – List of strings or a string. Labels can be in the format of BIO tags. Example: [“B-ORG”, “I-ORG”, “B-PER”, “I-PER”]
- Raises:
ValueError – If the input is not a list or a string.
- Returns:
List of entity types without the BIO tags.
- Return type:
labels (List[str])