spaCy/spacy/tests/regression
adrianeboyd 40e65d6f63
Fix most_similar for vectors with unused rows (#5348)
* Fix most_similar for vectors with unused rows

Address issues related to the unused rows in the vector table and
`most_similar`:

* Update `most_similar()` to search only through rows that are in use
according to `key2row`.

* Raise an error when `most_similar(n=n)` is larger than the number of
vectors in the table.

* Set and restore `_unset` correctly when vectors are added or
deserialized so that new vectors are added in the correct row.

* Set data and keys to the same length in `Vocab.prune_vectors()` to
avoid spurious entries in `key2row`.

* Fix regression test using `most_similar`

Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com>
2020-05-19 16:41:26 +02:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue1-1000.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue1001-1500.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue1501-2000.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue2001-2500.py Bugfix/get doc (#5049) 2020-03-02 11:49:28 +01:00
test_issue2501-3000.py Bugfix/get doc (#5049) 2020-03-02 11:49:28 +01:00
test_issue3001-3500.py Fix most_similar for vectors with unused rows (#5348) 2020-05-19 16:41:26 +02:00
test_issue3521.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3526.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3531.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3540.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3549.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue3555.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue3611.py Also support passing list to Language.disable_pipes (#4521) 2019-10-25 16:19:08 +02:00
test_issue3625.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3803.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3830.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3839.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue3869.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3879.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue3880.py Fix xpassing tests (#4657) 2019-11-16 20:20:53 +01:00
test_issue3882.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3951.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue3959.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3962.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue3972.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue4002.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue4030.py Also support passing list to Language.disable_pipes (#4521) 2019-10-25 16:19:08 +02:00
test_issue4042.py Tidy up and auto-format 2019-10-18 11:27:38 +02:00
test_issue4054.py Fix test imports 2019-09-29 17:34:56 +02:00
test_issue4120.py Implement new API for {Phrase}Matcher.add (backwards-compatible) (#4522) 2019-10-25 22:21:08 +02:00
test_issue4133.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue4190.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue4267.py Tidy up and auto-format 2019-10-18 11:27:38 +02:00
test_issue4272.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue4278.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue4313.py Revert #4334 2019-09-29 17:32:12 +02:00
test_issue4348.py Fix xpassing tests (#4657) 2019-11-16 20:20:53 +01:00
test_issue4367.py Tidy up and auto-format 2019-10-18 11:27:38 +02:00
test_issue4373.py Make PhraseMatcher.vocab consistent with Matcher.vocab (closes #4373) 2019-10-04 12:18:41 +02:00
test_issue4402.py Fix test util imports 2019-11-21 16:28:29 +01:00
test_issue4528.py Fix serialization of extension attr values in DocBin (#4540) 2019-10-28 16:02:13 +01:00
test_issue4529.py [#4529] fix: gold pyx (#4530) 2019-10-27 13:50:07 +01:00
test_issue4590.py Bugfix/get doc (#5049) 2020-03-02 11:49:28 +01:00
test_issue4651.py Fix test util imports 2019-11-21 16:28:29 +01:00
test_issue4665.py Fix for Issue 4665 - conllu2json (#4953) 2020-02-03 13:01:48 +01:00
test_issue4674.py Fix typo 2019-12-21 21:17:45 +01:00
test_issue4707.py Auto-exclude disabled when calling from_disk during load (#4708) 2019-11-25 16:01:22 +01:00
test_issue4725.py Tidy up and auto-format 2020-03-25 12:28:12 +01:00
test_issue4849.py Tidy up and auto-format 2020-03-25 12:28:12 +01:00
test_issue4903.py take care of global vectors in multiprocessing (#5081) 2020-03-03 13:58:22 +01:00
test_issue4924.py add unit test 2020-02-12 12:00:13 +01:00
test_issue5048.py Bugfix/get doc (#5049) 2020-03-02 11:49:28 +01:00
test_issue5082.py set vector of merged entity (#5085) 2020-03-06 14:45:28 +01:00
test_issue5137.py Fix passing of component configuration (#5374) 2020-04-29 12:56:17 +02:00
test_issue5152.py bugfix in span similarity (#5155) (#5358) 2020-04-27 16:51:27 +02:00