spaCy/spacy/matcher
Steele Farnsworth b18cb1cd2a
Refactor dependencymatcher.pyx to use list comps and enumerate. (#8956)
* Refactor to use list comps and enumerate.

Replace loops that append to a list with a list comprehensions where this does not change the behavior; replace range(len(...)) loops with enumerate. Correct one typo in a comment. Replace a call to set() with a set literal.

* Undo double assignment.

Expand `tokens_to_key[j] = k = self._get_matcher_key(key, i, j)` to two statements.

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Sign contributors agreement

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2021-08-18 09:55:45 +02:00
..
__init__.py Drop Python 2.7 and 3.5 (#4828) 2019-12-22 01:53:56 +01:00
dependencymatcher.pyx Refactor dependencymatcher.pyx to use list comps and enumerate. (#8956) 2021-08-18 09:55:45 +02:00
matcher.pxd Support match alignments (#7321) 2021-04-08 18:10:14 +10:00
matcher.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
matcher.pyx Support list values and INTERSECTS in Matcher (#8784) 2021-08-02 19:39:26 +02: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