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

Function tokenize

experiments/baselines/scholar_inbox/runner.py:153–162  ·  view source on GitHub ↗
(text: Any)

Source from the content-addressed store, hash-verified

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