spaCy/spacy/tests/pipeline
Matthew Honnibal 78d79d94ce Guess set_annotations=True in nlp.update
During `nlp.update`, components can be passed a boolean set_annotations
to indicate whether they should assign annotations to the `Doc`. This
needs to be called if downstream components expect to use the
annotations during training, e.g. if we wanted to use tagger features in
the parser.

Components can specify their assignments and requirements, so we can
figure out which components have these inter-dependencies. After
figuring this out, we can guess whether to pass set_annotations=True.

We could also call set_annotations=True always, or even just have this
as the only behaviour. The downside of this is that it would require the
`Doc` objects to be created afresh to avoid problematic modifications.
One approach would be to make a fresh copy of the `Doc` objects within
`nlp.update()`, so that we can write to the objects without any
problems. If we do that, we can drop this logic and also drop the
`set_annotations` mechanism. I would be fine with that approach,
although it runs the risk of introducing some performance overhead, and
we'll have to take care to copy all extension attributes etc.
2020-05-22 15:55:45 +02:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_analysis.py Default settings to configurations (#4995) 2020-02-27 18:42:27 +01:00
test_entity_linker.py Various fixes to NEL functionality, Example class etc (#5460) 2020-05-20 11:41:12 +02:00
test_entity_ruler.py Tidy up and auto-format 2020-02-18 15:38:18 +01:00
test_factories.py Drop Python 2.7 and 3.5 (#4828) 2019-12-22 01:53:56 +01:00
test_functions.py Drop Python 2.7 and 3.5 (#4828) 2019-12-22 01:53:56 +01:00
test_morphologizer.py Update morphologizer (#5108) 2020-04-02 14:46:32 +02:00
test_pipe_methods.py Guess set_annotations=True in nlp.update 2020-05-22 15:55:45 +02:00
test_sentencizer.py Merge branch 'master' into develop 2020-02-18 14:47:23 +01:00
test_senter.py Optimizer defaults (#5244) 2020-04-03 13:02:46 +02:00
test_simple_ner.py Adapt parser and NER for transformers (#5449) 2020-05-18 22:23:33 +02:00
test_tagger.py Default settings to configurations (#4995) 2020-02-27 18:42:27 +01:00
test_textcat.py default models defined in component decorator (#5452) 2020-05-19 16:20:03 +02:00