Skip to content

Trying to understand spancat vs NER use-cases #8930

Discussion options

You must be logged in to vote

When you use the default NER model, it has the constraint that a single token can't be more than one label, so it learns tradeoffs between different labels. In contrast the spancat component can't make that assumption, so it has more limited information to draw from.

To give a concrete if somewhat contrived example, consider these sentences.

  1. John lives in XXX.
  2. John lives at XXX.

In 1, XXX could be a GPE (country, state, city) or a LOC (non-GPE location). In 2 it would not be a GPE (X "John lives at Spain") but could be a LOC ("the North Pole").

In spancat these associations would have to be learned separately for each label type, since the fact that "lives at" is followed by a LOC doesn…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@thalishsajeed
Comment options

@polm
Comment options

@thalishsajeed
Comment options

@polm
Comment options

@thalishsajeed
Comment options

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