spaCy/spacy/tests/integration/test_load_languages.py

13 lines
338 B
Python
Raw Normal View History

2016-11-02 19:38:48 +00:00
# encoding: utf8
from __future__ import unicode_literals
from ...fr import French
def test_load_french():
nlp = French()
doc = nlp(u'Parlez-vous français?')
2016-11-02 19:40:31 +00:00
assert doc[0].text == u'Parlez'
assert doc[1].text == u'-'
assert doc[2].text == u'vouz'
assert doc[3].text == u'français'
assert doc[4].text == u'?'