MCPcopy Create free account
hub / github.com/MaxHastings/Kolo / TextParser

Class TextParser

scripts/SyntheticDataGeneration/TextParser.py:14–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12from concurrent.futures import ThreadPoolExecutor, as_completed
13
14class TextParser:
15 @staticmethod
16 def parse_questions(question_text: str) -> List[str]:
17 questions = []
18 for line in question_text.splitlines():
19 stripped = line.strip()
20 if not stripped:
21 continue
22 cleaned = re.sub(r'^[\d\.\-\+\*]+\s*', '', stripped)
23 cleaned = re.sub(r'\*+', '', cleaned).strip()
24 if '?' in cleaned:
25 questions.append(cleaned)
26 return questions

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected