2014-09-01 21:25:51 +00:00
|
|
|
# -*- coding: utf8 -*-
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import pytest
|
|
|
|
|
2014-09-10 16:27:44 +00:00
|
|
|
from spacy.orth import asciied
|
2014-09-01 21:25:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_tilde():
|
|
|
|
string = u'hõmbre'
|
2014-09-10 16:27:44 +00:00
|
|
|
assert asciied(string) == u'hombre'
|
2014-09-01 21:25:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_smart_quote():
|
|
|
|
string = u'“'
|
2014-09-10 16:27:44 +00:00
|
|
|
assert asciied(string) == '"'
|
2014-09-01 21:25:51 +00:00
|
|
|
string = u'”'
|
2014-09-10 16:27:44 +00:00
|
|
|
assert asciied(string) == '"'
|