From 4cab8ac1367ee11fe6b3fa49ed374459ff8977ec Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 15 Mar 2017 09:31:34 -0500 Subject: [PATCH] Update morph exceptions test --- spacy/tests/tagger/test_morph_exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacy/tests/tagger/test_morph_exceptions.py b/spacy/tests/tagger/test_morph_exceptions.py index 97ef58b0c..63b0a9c15 100644 --- a/spacy/tests/tagger/test_morph_exceptions.py +++ b/spacy/tests/tagger/test_morph_exceptions.py @@ -9,9 +9,9 @@ import pytest def test_tagger_load_morph_exc(en_tokenizer): text = "I like his style." tags = ['PRP', 'VBP', 'PRP$', 'NN', '.'] - morph_exc = {'PRP$': {'his': {'L': '-PRP-', 'person': 3, 'case': 2}}} + morph_exc = {'VBP': {'like': {'L': 'luck'}}} en_tokenizer.vocab.morphology.load_morph_exceptions(morph_exc) tokens = en_tokenizer(text) doc = get_doc(tokens.vocab, [t.text for t in tokens], tags=tags) - assert doc[2].tag_ == 'PRP$' - assert doc[2].lemma_ == '-PRP-' + assert doc[1].tag_ == 'VBP' + assert doc[1].lemma_ == 'luck'