Release 0.12.1
This is a quick follow-up release to 0.12 that fixes a few small bugs and includes an improved version of our Zelda entity linker.
New Entity Linking model
We include a new version of our Zelda entity linker with improved predictions. Try it as follows:
from flair.nn import Classifier
from flair.data import Sentence
# load the model
tagger = Classifier.load('linker')
# make a sentence
sentence = Sentence('Kirk and Spock met on the Enterprise.')
# predict NER tags
tagger.predict(sentence)
# print predicted entities
for label in sentence.get_labels():
print(label)
This should print:
Span[0:1]: "Kirk" → James_T._Kirk (0.9969)
Span[2:3]: "Spock" → Spock (0.9971)
Span[6:7]: "Enterprise" → USS_Enterprise_(NCC-1701-D) (0.975)
Indicating correctly that the span "Kirk" points to "James_T._Kirk". As the prediction for the string "Enterprise" shows, the model is still beta and will be further improved with future releases.