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

Function make_state

experiments/baselines/nl_profile/runner.py:319–325  ·  view source on GitHub ↗
(profile: Dict[str, Any], idf: Dict[str, float])

Source from the content-addressed store, hash-verified

317
318
319def make_state(profile: Dict[str, Any], idf: Dict[str, float]) -> UserNaturalProfileState:
320 return UserNaturalProfileState(
321 profile_text=str(profile.get("profile_text") or ""),
322 directions=list(profile.get("directions") or []),
323 terms=list(profile.get("terms") or []),
324 profile_vector=vectorize_text(profile.get("profile_text"), idf),
325 )
326
327
328def phrase_alignment_score(text: str, phrases: Sequence[str]) -> float:

Callers 1

rerank_episodesFunction · 0.85

Calls 3

getMethod · 0.80
vectorize_textFunction · 0.70

Tested by

no test coverage detected