mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Fix lemmatizer test
This commit is contained in:
parent
a86a0181b5
commit
63c6ae4191
|
@ -11,7 +11,7 @@ import pytest
|
||||||
def test_en_tagger_load_morph_exc(en_tokenizer):
|
def test_en_tagger_load_morph_exc(en_tokenizer):
|
||||||
text = "I like his style."
|
text = "I like his style."
|
||||||
tags = ['PRP', 'VBP', 'PRP$', 'NN', '.']
|
tags = ['PRP', 'VBP', 'PRP$', 'NN', '.']
|
||||||
morph_exc = {'VBP': {'like': {'L': 'luck'}}}
|
morph_exc = {'VBP': {'like': {'lemma': 'luck'}}}
|
||||||
en_tokenizer.vocab.morphology.load_morph_exceptions(morph_exc)
|
en_tokenizer.vocab.morphology.load_morph_exceptions(morph_exc)
|
||||||
tokens = en_tokenizer(text)
|
tokens = en_tokenizer(text)
|
||||||
doc = get_doc(tokens.vocab, [t.text for t in tokens], tags=tags)
|
doc = get_doc(tokens.vocab, [t.text for t in tokens], tags=tags)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user