spaCy/spacy/matcher
Paul O'Leary McCann d959603d51
Don't add duplicate patterns all the time in EntityRuler (fix #8216) (#8246)
* Don't add duplicate patterns (fix #8216)

* Refactor EntityRuler init

This simplifies the EntityRuler init code. This is helpful as prep for
allowing the EntityRuler to reset itself.

* Make EntityRuler.clear reset matchers

Includes a new test for this.

* Tidy PhraseMatcher instantiation

Since the attr can be None safely now, the guard if is no longer
required here.

Also renamed the `_validate` attr. Maybe it's not needed?

* Fix NER test

* Add test to make sure patterns aren't increasing

* Move test to regression tests
2021-06-03 09:05:26 +02:00
..
__init__.py Drop Python 2.7 and 3.5 (#4828) 2019-12-22 01:53:56 +01:00
dependencymatcher.pyx Preserve user data for DependencyMatcher on spans (#7528) 2021-03-30 12:26:22 +02:00
matcher.pxd Support match alignments (#7321) 2021-04-08 18:10:14 +10:00
matcher.pyx Support match alignments (#7321) 2021-04-08 18:10:14 +10:00
phrasematcher.pxd Run PhraseMatcher on Spans (#6918) 2021-02-10 23:43:32 +11:00
phrasematcher.pyx Don't add duplicate patterns all the time in EntityRuler (fix #8216) (#8246) 2021-06-03 09:05:26 +02:00