spaCy/spacy/pipeline/_parser_internals
Daniël de Kok 6906af3d8f NER: Ensure zero-cost sequence with sentence split in entity
If we use a sentence splitter as one of the annotating components during
training, an entity can become split in the predicted `Doc`. Before this
change, training would fail, because no zero-cost transition sequence
could be found.

This fixes two scenarios:

1. When the gold action is `B` and a split occurs after the current
   token, the `BEGIN` action is invalid. However, this was the only
   possible zero-cost action. This change makes `OUT` a zero-cost
   action in this case.
2. When the gold action is `I` and a split occurs after the current
   token, the `IN` action is invalid, removing the only zero-cost
   action. This change makes `LAST` a zero-cost action, so that the
   entity can be properly closed.
2023-03-24 15:35:22 +01:00
..
__init__.pxd Add beam_parser and beam_ner components for v3 (#6369) 2020-12-13 09:08:32 +08:00
__init__.py The Parser is now a Pipe (2) (#5844) 2020-07-30 23:30:54 +02:00
_beam_utils.pxd Add beam_parser and beam_ner components for v3 (#6369) 2020-12-13 09:08:32 +08:00
_beam_utils.pyx Getting scores out of beam_ner (#6575) 2021-01-06 12:02:32 +01:00
_state.pxd Use constant-time head lookups in StateC::{L,R} 2022-01-13 12:08:46 +01:00
_state.pyx The Parser is now a Pipe (2) (#5844) 2020-07-30 23:30:54 +02:00
arc_eager.pxd Getting scores out of beam_parser (#6684) 2021-01-07 16:28:27 +11:00
arc_eager.pyx account for NER labels with a hyphen in the name (#10960) 2022-06-17 20:02:37 +01:00
ner.pxd The Parser is now a Pipe (2) (#5844) 2020-07-30 23:30:54 +02:00
ner.pyx NER: Ensure zero-cost sequence with sentence split in entity 2023-03-24 15:35:22 +01:00
nonproj.hh Detect cycle during projectivize (#10877) 2022-06-08 19:34:11 +02:00
nonproj.pxd Detect cycle during projectivize (#10877) 2022-06-08 19:34:11 +02:00
nonproj.pyx Detect cycle during projectivize (#10877) 2022-06-08 19:34:11 +02:00
stateclass.pxd Add beam_parser and beam_ner components for v3 (#6369) 2020-12-13 09:08:32 +08:00
stateclass.pyx Add beam_parser and beam_ner components for v3 (#6369) 2020-12-13 09:08:32 +08:00
transition_system.pxd Support negative examples in partial NER annotations (#8106) 2021-06-17 17:33:00 +10:00
transition_system.pyx Support negative examples in partial NER annotations (#8106) 2021-06-17 17:33:00 +10:00