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

Method definition

pattern/web/__init__.py:1377–1384  ·  view source on GitHub ↗

Returns a dictionary definition for the given string.

(self, string)

Source from the content-addressed store, hash-verified

1375 return s
1376
1377 def definition(self, string):
1378 """ Returns a dictionary definition for the given string.
1379 """
1380 s = self.answer(string, field="Definition", cached=True)
1381 s = re.sub(r"^.*? definition: ", "", s)
1382 s = re.sub(r"(^'''.*?''' |^)(.)(.*?)$",
1383 lambda m: m.group(1) + m.group(2).upper() + m.group(3), s)
1384 return s
1385
1386DDG = DuckDuckGo
1387

Callers

nothing calls this directly

Calls 2

answerMethod · 0.95
groupMethod · 0.45

Tested by

no test coverage detected