MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / tokenize

Function tokenize

experiments/baselines/scinup_strict/runner.py:132–141  ·  view source on GitHub ↗
(text: Any)

Source from the content-addressed store, hash-verified

130
131
132def tokenize(text: Any) -> List[str]:
133 tokens: List[str] = []
134 for raw_token in TOKEN_RE.findall(str(text or "").casefold()):
135 token = raw_token.replace("_", "-")
136 if len(token) <= 1:
137 continue
138 tokens.append(token)
139 if "-" in token:
140 tokens.extend(part for part in token.split("-") if len(part) > 1)
141 return tokens
142
143
144def paper_text(row: Dict[str, Any]) -> str:

Callers 2

build_bm25_stateFunction · 0.70
rerank_episodesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected