mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 18:56:36 +03:00
80b94313b6
Closes #2203. Closes #3268. Lemmas set from outside the `Morphology` class were being overwritten. The result was especially confusing when deserialising, as it meant some lemmas could change when storing and retrieving a `Doc` object. This PR applies two fixes: 1) When we go to set the lemma in the `Morphology` class, first check whether a lemma is already set. If so, don't overwrite. 2) When we load with `doc.from_array()`, take care to apply the `TAG` field first. This allows other fields to overwrite the `TAG` implied properties, if they're provided explicitly (e.g. the `LEMMA`). ## Checklist <!--- Before you submit the PR, go over this checklist and make sure you can tick off all the boxes. [] -> [x] --> - [x] I have submitted the spaCy Contributor Agreement. - [x] I ran the tests, and all new and existing tests passed. - [x] My changes don't require a change to the documentation, or if they do, I've added all required information. |
||
---|---|---|
.. | ||
__init__.py | ||
test_issue1-1000.py | ||
test_issue1001-1500.py | ||
test_issue1501-2000.py | ||
test_issue2001-2500.py | ||
test_issue2501-3000.py | ||
test_issue3002.py | ||
test_issue3009.py | ||
test_issue3012.py | ||
test_issue3199.py | ||
test_issue3209.py | ||
test_issue3248.py | ||
test_issue3277.py | ||
test_issue3288.py | ||
test_issue3289.py | ||
test_issue3328.py | ||
test_issue3331.py | ||
test_issue3345.py |