From a1c984043a4ad91c3e5a2683e513a96f84dfe7e7 Mon Sep 17 00:00:00 2001 From: Kevin Humphreys Date: Thu, 15 Sep 2022 12:42:17 -0700 Subject: [PATCH] remove polyleven --- requirements.txt | 1 - setup.cfg | 1 - spacy/matcher/matcher.pyx | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index fa654dc67..3e8501b2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,6 @@ tqdm>=4.38.0,<5.0.0 pydantic>=1.7.4,!=1.8,!=1.8.1,<1.10.0 jinja2 langcodes>=3.2.0,<4.0.0 -polyleven>=0.7,<1.0 # Official Python utilities setuptools packaging>=20.0 diff --git a/setup.cfg b/setup.cfg index 2bb04e078..2dc5e7042 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,7 +58,6 @@ install_requires = requests>=2.13.0,<3.0.0 pydantic>=1.7.4,!=1.8,!=1.8.1,<1.10.0 jinja2 - polyleven>=0.7,<1.0 # Official Python utilities setuptools packaging>=20.0 diff --git a/spacy/matcher/matcher.pyx b/spacy/matcher/matcher.pyx index 38be8170c..b0c02aa07 100644 --- a/spacy/matcher/matcher.pyx +++ b/spacy/matcher/matcher.pyx @@ -10,7 +10,6 @@ from murmurhash.mrmr cimport hash64 import re import srsly import warnings -from polyleven import levenshtein from ..typedefs cimport attr_t from ..structs cimport TokenC @@ -26,6 +25,8 @@ from ..errors import Errors, MatchPatternError, Warnings from ..strings import get_string_id from ..attrs import IDS +from .levenshtein import levenshtein + DEF PADDING = 5