2016-11-02 22:38:48 +03:00
|
|
|
# encoding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
from ...fr import French
|
2016-11-24 17:56:38 +03:00
|
|
|
from ...nl import Dutch
|
2016-11-02 22:38:48 +03:00
|
|
|
|
|
|
|
def test_load_french():
|
|
|
|
nlp = French()
|
|
|
|
doc = nlp(u'Parlez-vous français?')
|
2016-11-02 22:40:31 +03:00
|
|
|
assert doc[0].text == u'Parlez'
|
|
|
|
assert doc[1].text == u'-'
|
2016-11-02 22:48:40 +03:00
|
|
|
assert doc[2].text == u'vous'
|
2016-11-02 22:40:31 +03:00
|
|
|
assert doc[3].text == u'français'
|
|
|
|
assert doc[4].text == u'?'
|
2016-11-24 17:56:38 +03:00
|
|
|
|
|
|
|
def test_load_dutch():
|
|
|
|
nlp = Dutch()
|
|
|
|
doc = nlp(u'Is dit Nederlands?')
|
|
|
|
assert doc[0].text == u'Is'
|
|
|
|
assert doc[1].text == u'dit'
|
|
|
|
assert doc[2].text == u'Nederlands'
|
|
|
|
assert doc[3].text == u'?'
|