mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +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 ..tokens import Doc
|
||||
from ..strings import StringStore
|
||||
from ..lemmatizer import Lemmatizer
|
||||
from ..attrs import ORTH, TAG, HEAD, DEP
|
||||
from ..util import match_best_version, get_data_path
|
||||
|
||||
|
@ -66,6 +67,14 @@ def en_entityrecognizer():
|
|||
return English.Defaults.create_entity()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def lemmatizer(path):
|
||||
if path is not None:
|
||||
return Lemmatizer.load(path)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def text_file():
|
||||
return StringIO()
|
||||
|
|
Loading…
Reference in New Issue
Block a user