Skip to content

Current entity augmenters does not handle entity-'links' #219

@KennethEnevoldsen

Description

@KennethEnevoldsen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions