TagMe Annotator
The TagMeAnnotator
is an annotator that uses the TagMe service to annotate documents. The Service provides two tasks (“tag” and “spot”) for the languages de, en and it.
import os
from gatenlp import Document
from gatenlp.processing.client.tagme import TagMeAnnotator
auth_token = os.environ["TAGME_AUTH_TOKEN"] # one way to pass on the token: set an env var
doc = Document("Barack Obama visited Microsoft in New York last May.")
annt = TagMeAnnotator(
url="https://tagme.d4science.org/tagme/tag",
lang="en",
ann_type="Mention",
task="tag",
outset_name="",
tweet=False,
auth_token=auth_token
)
doc = annt(doc)
doc
Notebook last updated
import gatenlp
print("NB last updated with gatenlp version", gatenlp.__version__)
NB last updated with gatenlp version 1.0.8a1