mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-15 06:09:01 +03:00
00b9a58558
* lemma of was-> was * added new pairs issue @2486 * added article tests
16 lines
616 B
Python
16 lines
616 B
Python
# coding: utf-8
|
|
from __future__ import unicode_literals
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize('string,lemma', [('Abgehängten', 'Abgehängte'),
|
|
('engagierte', 'engagieren'),
|
|
('schließt', 'schließen'),
|
|
('vorgebenden', 'vorgebend'),
|
|
('die', 'der'),
|
|
('Die', 'der')])
|
|
def test_lemmatizer_lookup_assigns(de_tokenizer, string, lemma):
|
|
tokens = de_tokenizer(string)
|
|
assert tokens[0].lemma_ == lemma
|