'Senna pipeline interface'

def test_senna_pipeline(self):

    pipeline = Senna(SENNA_EXECUTABLE_PATH, [u'pos', u'chk', u'ner'])
    sent = u'Dusseldorf    is    an    international    business    center'.split()
    result = [(token[u'word'], token[u'chk'], token[u'ner'], token[u'pos']) for token in pipeline.tag(sent)]
    expected = [(u'Dusseldorf', u'B-NP', u'B-LOC', u'NNP'), (u'is', u'B-VP', u'O', u'VBZ'), (u'an', u'B-NP', u'O', u'DT'), (u'international', u'I-NP', u'O', u'JJ'), (u'business', u'I-NP', u'O', u'NN'), (u'center', u'I-NP', u'O', u'NN')]
    self.assertEqual(result, expected)
