spaCy/spacy/tests/regression/test_issue2754.py

11 lines
286 B
Python
Raw Normal View History

# coding: utf8
from __future__ import unicode_literals
2019-02-08 13:14:49 +00:00
def test_issue2754(en_tokenizer):
"""Test that words like 'a' and 'a.m.' don't get exceptional norm values."""
2019-02-08 13:14:49 +00:00
a = en_tokenizer("a")
assert a[0].norm_ == "a"
am = en_tokenizer("am")
assert am[0].norm_ == "am"