MCPcopy Create free account
hub / github.com/clips/pattern / imperative

Function imperative

examples/04-search/07-exclude.py:28–33  ·  view source on GitHub ↗
(sentence)

Source from the content-addressed store, hash-verified

26# because the parses sometimes tags infinitive "do" incorrectly.
27
28def imperative(sentence):
29 for p in ("!could|!would|!should|!to+ VB", "^VB", "^do|VB*"):
30 m = match(p, sentence)
31 if match(p, sentence) and sentence.string.endswith((".","!")): # Exclude questions.
32 return True
33 return False
34
35for s in (
36 "Just stop it!",

Callers 1

07-exclude.pyFile · 0.70

Calls 1

matchFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…