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

Function tokenize

experiments/baselines/citation_enhanced/runner.py:154–163  ·  view source on GitHub ↗
(text: Any)

Source from the content-addressed store, hash-verified

152
153
154def tokenize(text: Any) -> List[str]:
155 tokens: List[str] = []
156 for raw_token in TOKEN_RE.findall(str(text or "").casefold()):
157 token = raw_token.replace("_", "-")
158 if len(token) <= 1:
159 continue
160 tokens.append(token)
161 if "-" in token:
162 tokens.extend(part for part in token.split("-") if len(part) > 1)
163 return tokens
164
165
166def paper_text(row: Dict[str, Any]) -> str:

Callers 2

build_idf_from_textsFunction · 0.70
vectorize_textFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected