Skip to content
Discussion options

You must be logged in to vote

This isn't possible with the ner component. With the spancat component, you can set a very low threshold for prediction and then select the top N predictions from the stored scores (see https://spacy.io/api/spancategorizer#assigned-attributes), although it's still not guaranteed that the model will make at least one prediction for any given text. This is just brainstorming, but I think you could have some kind of backoff for the case without any predictions, like selecting the first proper noun in the text.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by polm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / ner Feature: Named Entity Recognizer feat / spancat Feature: Span Categorizer
2 participants