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

Function content_score

experiments/baselines/citation_enhanced/runner.py:423–428  ·  view source on GitHub ↗
(row_vector: Dict[str, float], state: UserCitationState)

Source from the content-addressed store, hash-verified

421
422
423def content_score(row_vector: Dict[str, float], state: UserCitationState) -> float:
424 profile_score = scaled_similarity(row_vector, state.profile_vector)
425 if state.selected_count <= 0:
426 return profile_score
427 feedback_score = scaled_similarity(row_vector, state.selected_centroid())
428 return clamp(0.65 * feedback_score + 0.35 * profile_score)
429
430
431def citation_relation_score(row: Dict[str, Any], state: UserCitationState) -> Tuple[float, bool, float]:

Callers 1

score_rowFunction · 0.70

Calls 3

scaled_similarityFunction · 0.70
clampFunction · 0.70
selected_centroidMethod · 0.45

Tested by

no test coverage detected