mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-05 20:33:10 +03:00
Add Lemmatizer fixture
This commit is contained in:
parent
514bfa2597
commit
09acfbca01
|
@ -12,6 +12,7 @@ from ..sv import Swedish
|
||||||
from ..hu import Hungarian
|
from ..hu import Hungarian
|
||||||
from ..tokens import Doc
|
from ..tokens import Doc
|
||||||
from ..strings import StringStore
|
from ..strings import StringStore
|
||||||
|
from ..lemmatizer import Lemmatizer
|
||||||
from ..attrs import ORTH, TAG, HEAD, DEP
|
from ..attrs import ORTH, TAG, HEAD, DEP
|
||||||
from ..util import match_best_version, get_data_path
|
from ..util import match_best_version, get_data_path
|
||||||
|
|
||||||
|
@ -66,6 +67,14 @@ def en_entityrecognizer():
|
||||||
return English.Defaults.create_entity()
|
return English.Defaults.create_entity()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def lemmatizer(path):
|
||||||
|
if path is not None:
|
||||||
|
return Lemmatizer.load(path)
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def text_file():
|
def text_file():
|
||||||
return StringIO()
|
return StringIO()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user