mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
03fefa37e2
* Add overwrite settings for more components For pipeline components where it's relevant and not already implemented, add an explicit `overwrite` setting that controls whether `set_annotations` overwrites existing annotation. For the `morphologizer`, add an additional setting `extend`, which controls whether the existing features are preserved. * +overwrite, +extend: overwrite values of existing features, add any new features * +overwrite, -extend: overwrite completely, removing any existing features * -overwrite, +extend: keep values of existing features, add any new features * -overwrite, -extend: do not modify the existing value if set In all cases an unset value will be set by `set_annotations`. Preserve current overwrite defaults: * True: morphologizer, entity linker * False: tagger, sentencizer, senter * Add backwards compat overwrite settings * Put empty line back Removed by accident in last commit * Set backwards-compatible defaults in __init__ Because the `TrainablePipe` serialization methods update `cfg`, there's no straightforward way to detect whether models serialized with a previous version are missing the overwrite settings. It would be possible in the sentencizer due to its separate serialization methods, however to keep the changes parallel, this also sets the default in `__init__`. * Remove traces Co-authored-by: Paul O'Leary McCann <polm@dampfkraft.com> |
||
---|---|---|
.. | ||
cli | ||
displacy | ||
lang | ||
matcher | ||
ml | ||
pipeline | ||
tests | ||
tokens | ||
training | ||
__init__.pxd | ||
__init__.py | ||
__main__.py | ||
about.py | ||
attrs.pxd | ||
attrs.pyx | ||
compat.py | ||
default_config_pretraining.cfg | ||
default_config.cfg | ||
errors.py | ||
glossary.py | ||
kb.pxd | ||
kb.pyx | ||
language.py | ||
lexeme.pxd | ||
lexeme.pyi | ||
lexeme.pyx | ||
lookups.py | ||
morphology.pxd | ||
morphology.pyx | ||
parts_of_speech.pxd | ||
parts_of_speech.pyx | ||
pipe_analysis.py | ||
py.typed | ||
schemas.py | ||
scorer.py | ||
strings.pxd | ||
strings.pyi | ||
strings.pyx | ||
structs.pxd | ||
symbols.pxd | ||
symbols.pyx | ||
tokenizer.pxd | ||
tokenizer.pyx | ||
typedefs.pxd | ||
typedefs.pyx | ||
util.py | ||
vectors.pyx | ||
vocab.pxd | ||
vocab.pyi | ||
vocab.pyx |