augmenty icon indicating copy to clipboard operation
augmenty copied to clipboard

Current entity augmenters does not handle entity-'links'

Open KennethEnevoldsen opened this issue 6 months ago • 0 comments

Current entity augmenters do not handle entity links as one would use for entity linking.

Ideally, entity formatters should keep the same link, while entity replacers could potentially add a new link.

if you don't care about the links annotation they can be removed using augmenters such as:

def create_remove_links_augmenter() -> Callable[..., Iterator[Any]]:
    def remove_links(nlp: Language, example: Example) -> Iterator[Example]:
        example_dict = example.to_dict()
        example_dict["doc_annotation"].pop("links")
        yield Example.from_dict(example.y, example_dict)
    return remove_links

KennethEnevoldsen avatar Dec 26 '23 13:12 KennethEnevoldsen