2019-07-11 09:56:27 +00:00
|
|
|
# coding: utf8
|
2019-07-11 09:23:14 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from spacy.lang.hi import Hindi
|
|
|
|
|
2019-07-17 10:34:13 +00:00
|
|
|
|
2019-07-11 09:23:14 +00:00
|
|
|
def test_issue3625():
|
|
|
|
"""Test that default punctuation rules applies to hindi unicode characters"""
|
|
|
|
nlp = Hindi()
|
2019-07-17 10:34:13 +00:00
|
|
|
doc = nlp("hi. how हुए. होटल, होटल")
|
|
|
|
expected = ["hi", ".", "how", "हुए", ".", "होटल", ",", "होटल"]
|
|
|
|
assert [token.text for token in doc] == expected
|