MCPcopy Index your code
hub / github.com/clips/pattern / test_match_function

Method test_match_function

test/test_search.py:421–428  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

419 print "pattern.search.compile()"
420
421 def test_match_function(self):
422 # Assert match() function.
423 s = Sentence(parse("Go on Bors, chop his head off!"))
424 m1 = search.match("chop NP off", s, strict=False)
425 m2 = search.match("chop NP+ off", s, strict=True)
426 self.assertEqual(m1.constituents()[1].string, "his head")
427 self.assertEqual(m2.constituents()[1].string, "his head")
428 print "pattern.search.match()"
429
430 def test_search_function(self):
431 # Assert search() function.

Callers

nothing calls this directly

Calls 4

parseFunction · 0.90
SentenceClass · 0.50
matchMethod · 0.45
constituentsMethod · 0.45

Tested by

no test coverage detected