Skip to content

Commit 5f2058c

Browse files
committed
fix: rename SIMILARITY_SCALE constant and fix terminology in docstrings
1 parent 558714f commit 5f2058c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

utils/recommender.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def score_single_project(project, user_skills, level, interest, time_availabilit
111111
if project.get("time", "").lower() == time_availability.lower():
112112
bonus_score += WEIGHT_TIME
113113

114-
# Combine: skill similarity (scaled to 10) + bonus points
115-
# Scaling skill_score to 10 keeps it comparable to bonus_score
116-
final_score = (skill_score * 10) + bonus_score
114+
SIMILARITY_SCALE = 10 # scales cosine similarity (0.0–1.0) to 0–10 range
115+
# so skill match weight is comparable to bonus_score (max 5 points)
116+
final_score = (skill_score * SIMILARITY_SCALE) + bonus_score
117117

118118
return final_score
119119

0 commit comments

Comments
 (0)