Behaviour of is_oov for en_core_web_trf pipeline #11844
-
Hi-- I'm trying to understand the For example: nlp = spacy.load("en_core_web_trf")
[tok.is_oov for tok in nlp("Is this out: alksjfad")]
>>> [True, True, True, True, True] Compare this with: nlp = spacy.load("en_core_web_lg")
[tok.is_oov for tok in nlp("Is this out: alksjfad")]
>>> [False, False, False, False, True] Am I to understand that the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Beta Was this translation helpful? Give feedback.
is_oov
indicates whether a token has a (static) word vector; the transformer pipelines don't include word vectors, so everything is OOV in that sense.