Open dicleozturk opened 1 year ago
Hello @dicleozturk the new release removed the MultiTagger
in favor of the more general MultitaskModel
. (Sorry about that, we did not realize that people were using the MultiTagger
.)
The MultitaskModel
is initialized by passing a list of classifiers. You can use it like this:
from flair.data import Sentence
from flair.models import MultitaskModel
from flair.nn import Classifier
# instantiate a NER and POS tagger
ner_tagger = Classifier.load('ner-fast')
pos_tagger = Classifier.load('pos-fast')
# create multi-task model
model = MultitaskModel([ner_tagger, pos_tagger])
# make a sentence
sentence = Sentence("I love Berlin")
# predict everything
model.predict(sentence)
# print predictions
print(sentence)
Question
Hello, I've been using flair.MultiTagger until recently. But all of a sudden I receive the following error when I try to load the model to run multiple predictions for postagging, chunking and NER:
I run: from flair.models import MultiTagger
But I get: ImportError: cannot import name 'MultiTagger' from 'flair.models'
Any ideas? I couldn't find any change or any other bug report.