MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / add_candidate

Function add_candidate

scripts/extract_evidence.py:434–448  ·  view source on GitHub ↗
(text: str, section: str, kind_hint: str)

Source from the content-addressed store, hash-verified

432 seen = set()
433
434 def add_candidate(text: str, section: str, kind_hint: str) -> None:
435 cleaned = normalize_whitespace(text)
436 if not looks_like_math_candidate(cleaned, kind_hint):
437 return
438 marker = cleaned.lower()
439 if marker in seen:
440 return
441 seen.add(marker)
442 candidates.append(
443 {
444 "equation": cleaned,
445 "source_section": section,
446 "kind_hint": kind_hint,
447 }
448 )
449
450 math_like_patterns = [
451 (r"O\([^)]*\)", "method", "complexity"),

Callers 1

Calls 2

normalize_whitespaceFunction · 0.90

Tested by

no test coverage detected