ai-content-maker/.venv/Lib/site-packages/spacy/tests/lang/hi/test_text.py

13 lines
401 B
Python
Raw Normal View History

2024-05-03 04:18:51 +03:00
import pytest
from spacy.lang.hi import Hindi
@pytest.mark.issue(3625)
def test_issue3625():
"""Test that default punctuation rules applies to hindi unicode characters"""
nlp = Hindi()
doc = nlp("hi. how हुए. होटल, होटल")
expected = ["hi", ".", "how", "हुए", ".", "होटल", ",", "होटल"]
assert [token.text for token in doc] == expected