MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / extract

Function extract

docs/mathnet/scripts/extract-fragments.py:24–30  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

22
23
24def extract(text: str) -> list[str]:
25 frags = []
26 for pat in PATTERNS:
27 for m in pat.finditer(text):
28 frags.append(m.group(1).strip())
29 text = pat.sub(' ', text)
30 return [f for f in frags if f]
31
32
33def main() -> None:

Callers 1

mainFunction · 0.70

Calls 1

subMethod · 0.65

Tested by

no test coverage detected