@pytest.mark.slow
@pytest.mark.models
@pytest.mark.parametrize(u'text,expected_sents', TEST_CASES)
def test_parser_sbd_prag(EN, text, expected_sents):
 doc = EN(text)
 sents = []
 for sent in doc.sents:
  sents.append(u''.join((doc[i].string for i in range(sent.start, sent.end))).strip())
 assert (sents == expected_sents)

@ pytest . mark . slow @ pytest . mark . models @ pytest . mark . parametrize ( u'text,expected_sents' , TEST_CASES ) def test_parser_sbd_prag ( EN , text , expected_sents ) : doc = EN ( text ) sents = [ ] for sent in doc . sents : sents . append ( u'' . join ( ( doc [ i ] . string for i in range ( sent . start , sent . end ) ) ) . strip ( ) ) assert ( sents == expected_sents )
sbd tests from pragmatic segmenter .