spaCy/tests/test_asciify.py

19 lines
330 B
Python
Raw Normal View History

# -*- coding: utf8 -*-
from __future__ import unicode_literals
import pytest
2014-09-10 20:27:44 +04:00
from spacy.orth import asciied
def test_tilde():
string = u'hõmbre'
2015-01-05 17:03:29 +03:00
assert asciied(string) == b'hombre'
def test_smart_quote():
string = u''
2015-01-05 17:03:29 +03:00
assert asciied(string) == b'"'
2015-01-05 17:09:44 +03:00
string = u''
2015-01-05 17:03:29 +03:00
assert asciied(string) == b'"'