mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
4454c1b23f
Fixes check that an adjective is a base form (as opposed to a comparative or superlative), so that it's not lemmatized. e.g. inner -!> inn. Closes #912.
15 lines
366 B
Python
15 lines
366 B
Python
# coding: utf8
|
|
from __future__ import unicode_literals
|
|
|
|
import pytest
|
|
from ...tokens import Doc
|
|
|
|
|
|
@pytest.mark.parametrize('text,tag,lemma', [("inner", "JJ", "inner")])
|
|
def test_issue912(en_vocab, text, tag, lemma):
|
|
'''Test base-forms of adjectives are preserved.'''
|
|
doc = Doc(en_vocab, words=[text])
|
|
doc[0].tag_ = tag
|
|
assert doc[0].lemma_ == lemma
|
|
|