spaCy/spacy/tests/vocab/test_asciify.py

19 lines
330 B
Python
Raw Normal View History

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