예제 #1
0
	def test_combine1(self):
		sentence1 = "nice"
		sentence2 = "not nice"
		tree1 = text_to_trees(sentence1)[0]
		tree2 = text_to_trees(sentence2)[0]
		adj1 = Adjective(tree1)
		adj2 = Adjective(tree2)
		self.assertFalse(adj1.is_negated)
		self.assertTrue(adj2.is_negated)
		adj1.combine(adj2)
		self.assertTrue(adj1.is_negated)
예제 #2
0
	def test_combine2(self):
		sentence = "nice"
		tree = text_to_trees(sentence)[0]
		adj1 = Adjective(tree)
		adj2 = Adjective(tree)
		self.assertTrue(adj1.combine(adj2))