Hi,
I passed the prediction() function, but when I used it to predict sentence, all the NER outputs are B-art. I don’t know how to remedy it. I would appreciate it very much for your suggestions. Thanks a lot!!
Below is the prediction fucntion:
![image|690x446]Sharing grade cell codes is against community guidelines, kindly refrain from posting codes in future, you can always share error encountered or your output with the expected output image.
This is the wrong prediction example:
sentence = “Sharon Floyd flew to Miami last Friday”
predictions = predict(sentence, model, sentence_vectorizer, tag_map)
for x,y in zip(sentence.split(’ '), predictions):
if y != ‘0’:
print(x,y)
Sharon B-art
Floyd B-art
flew B-art
to B-art
Miami B-art
last B-art
Friday B-art