augmenty
augmenty copied to clipboard
Current entity augmenters does not handle entity-'links'
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