NER component in en_core_web_trf doesn't depend on transformer #13328
-
How to reproduce the behaviourI just wanted entities so I thought I would only enable NER in case it goes a bit faster.
It looks like the outputs are just that subsequent bigrams is ORDINAL:
The problem goes away when I enable transformer:
Output:
I suppose Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's right - it does. In the config file for
which means that the I can see how this behaviour is a bit surprising if you're not used to the config details, especially as no warning is given. It's a bit of an unfortunate side effect of how the listener mechanism works. You might not be interested in all the technical details (🙈) but there's a small "hack" in the code where the listener needs to return "empty" vectors because it actually can't crash at that moment - the same code path can be valid when the model is being initialized and the listener just needs to provide vectors of the right dimension. That said, I realise how ideally this situation should raise a warning. We'll have a look at how to accomplish that. |
Beta Was this translation helpful? Give feedback.
That's right - it does. In the config file for
en_core_web_trf
, you can see the following:which means that the
ner
component relies on thetransformer
component. If you don't enable the latter, the output will be random/nonsensical.I can see how this behaviour is a bit surprising if you're not used to the config details, especially as no warning is given. It's a bit of an unfortunate side effect of how the listener mechanism works. You might not be interested in all the technical details (🙈) but there's a s…