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

Method _variations

pattern/text/search.py:781–784  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

779 return sorted(a)[0][-1]
780
781 def _variations(self):
782 v = variations(self.sequence, optional=lambda constraint: constraint.optional)
783 v = sorted(v, key=len, reverse=True)
784 return v
785
786 def _match(self, sequence, sentence, start=0, i=0, w0=None, map=None, d=0):
787 # Backtracking tree search.

Callers 2

searchMethod · 0.95
matchMethod · 0.95

Calls 1

variationsFunction · 0.85

Tested by

no test coverage detected