예제 #1
0
    def testGetPhraseOffset(self):
        s = Sentence(TEST_TOKENS)
        tests = [(1, (0, 2)), (2, (3, 5)), (3, (6, 8)), (4, (9, 10))]

        for number, offset in tests:
            self.assertEqual(s.phraseOffsetFor(number), offset)
예제 #2
0
파일: test_sentence.py 프로젝트: fnl/libfnl
    def testGetPhraseOffset(self):
        s = Sentence(TEST_TOKENS)
        tests = [(1, (0, 2)), (2, (3, 5)), (3, (6, 8)), (4, (9, 10))]

        for number, offset in tests:
            self.assertEqual(s.phraseOffsetFor(number), offset)