def test_keyterm_is_first_not_first(self): node = Node('(a) This has a list: apples et seq.', label=['101', '22', 'a']) node.tagged_text = '(a) This has a list: apples <E T="03">et seq.</E>' kt = KeyTerms(None) self.assertFalse(kt.keyterm_is_first(node, 'et seq.'))
def test_emphasis_close_to_front(self): """ An emphasized word is close to the front, but is not a key term. """ node = Node('(a) T et seq. has a list: apples', label=['101', '22', 'a']) node.tagged_text = '(a) T <E T="03">et seq.</E> has a list: apples' kt = KeyTerms(None) self.assertFalse(kt.keyterm_is_first(node, 'et seq.'))