mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-30 17:16:16 +00:00
fix(python): parse empty trigram/vector ranks in hachimoji_citation
Empty ranks from FULL OUTER JOIN return empty strings, not '0'. Fixed int() parsing to handle empty fields. Now regime clustering is verified: - Φ queries retrieve phase transition papers - Ω queries retrieve critical/eigensolid papers Build: 2987 jobs, 0 errors (lake build)
This commit is contained in:
parent
aee8642dd2
commit
c1b86e2e80
1 changed files with 8 additions and 4 deletions
|
|
@ -272,11 +272,13 @@ def cite_equation(
|
|||
parts = line.split("|")
|
||||
if len(parts) >= 5:
|
||||
try:
|
||||
trig = int(parts[2]) if parts[2].strip() else 0
|
||||
vec = int(parts[3]) if parts[3].strip() else 0
|
||||
citations.append(Citation(
|
||||
paper_id = parts[0].strip(),
|
||||
title = parts[1].strip()[:200],
|
||||
trigram_rank = int(parts[2].strip()),
|
||||
vector_rank = int(parts[3].strip()),
|
||||
trigram_rank = trig,
|
||||
vector_rank = vec,
|
||||
rrf_score = float(parts[4].strip()),
|
||||
))
|
||||
except (ValueError, IndexError):
|
||||
|
|
@ -338,10 +340,12 @@ def cite_batch(
|
|||
parts = line.split("|")
|
||||
if len(parts) >= 5:
|
||||
try:
|
||||
trig = int(parts[2]) if parts[2].strip() else 0
|
||||
vec = int(parts[3]) if parts[3].strip() else 0
|
||||
citations.append(Citation(
|
||||
paper_id=parts[0].strip(), title=parts[1].strip()[:200],
|
||||
trigram_rank=int(parts[2].strip()),
|
||||
vector_rank=int(parts[3].strip()),
|
||||
trigram_rank=trig,
|
||||
vector_rank=vec,
|
||||
rrf_score=float(parts[4].strip()),
|
||||
))
|
||||
except (ValueError, IndexError):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue