update
Browse files- api/services.py +1 -1
- src/similarity_model/hybrid_ranker.py +4 -3
api/services.py
CHANGED
|
@@ -51,7 +51,7 @@ def analyze_project(
|
|
| 51 |
|
| 52 |
for _, row in results.iterrows():
|
| 53 |
orig_score = round(float(row.get("originality_score", 0)), 2)
|
| 54 |
-
sim_percent = round(
|
| 55 |
|
| 56 |
top_projects.append({
|
| 57 |
"project_title": row.get("project_title", ""),
|
|
|
|
| 51 |
|
| 52 |
for _, row in results.iterrows():
|
| 53 |
orig_score = round(float(row.get("originality_score", 0)), 2)
|
| 54 |
+
sim_percent = round(float(row.get("hybrid_score", 0)) * 100, 2)
|
| 55 |
|
| 56 |
top_projects.append({
|
| 57 |
"project_title": row.get("project_title", ""),
|
src/similarity_model/hybrid_ranker.py
CHANGED
|
@@ -217,9 +217,10 @@ def compare_single_candidate(
|
|
| 217 |
unique_query_count=unique_query_count
|
| 218 |
)
|
| 219 |
|
| 220 |
-
originality_score =
|
| 221 |
-
|
| 222 |
-
|
|
|
|
| 223 |
)
|
| 224 |
|
| 225 |
hybrid_score = base_similarity
|
|
|
|
| 217 |
unique_query_count=unique_query_count
|
| 218 |
)
|
| 219 |
|
| 220 |
+
originality_score = compute_originality(
|
| 221 |
+
hybrid_score=base_similarity,
|
| 222 |
+
unique_query_features=unique_query_count,
|
| 223 |
+
total_query_features=total_query_features
|
| 224 |
)
|
| 225 |
|
| 226 |
hybrid_score = base_similarity
|