Commit 6defbae
docs(internal): correct the reference-graph ranking comment (#2285)
* docs(internal): correct the reference-graph ranking comment
_GRAPH_HIT_SCORE said fuzzy scores are capped at 100, so a confirmed reference
ranks at or above every fuzzy name match. The cap lives in _search_in_dict and
bounds the config-body score. The fuzzy name score comes from
_calculate_entity_score, which accumulates its bonuses with no ceiling, so a
name echoing the queried entity's words can pass 100 on its own and outrank a
graph hit's fixed 100.
The exact-mode half of the claim holds and stays. The comment now states what
fuzzy mode does, scoped to graph-ONLY hits (_merge_graph_hits leaves an
already-scored record's score alone) and to the case where visibility
enforcement does not scrub the record.
Also name the scene caller in _individual_fetch_budgeted's deprioritize
paragraph: it passes the set too, alongside automation and script.
* docs(internal): qualify the graph-hit score impossibility claim
The comment said no value of _GRAPH_HIT_SCORE makes fuzzy mode
symmetric, and rested that on _calculate_entity_score having no
ceiling. The absent clamp does not carry the claim: that score is a sum
of bounded parts, so a large enough constant would dominate it. What
actually rules such a constant out is the exact-mode property the
paragraph above asserts - every survivor scores 100 there, and raising
the constant breaks that tie. Name the condition instead of leaving it
implicit.
* docs(internal): say the name score is not capped, not that it is unbounded
The comment described `_calculate_entity_score` as accumulating "without a
ceiling". The function is a finite sum of bounded terms — three
`calculate_*_ratio` helpers that each return 0-100, plus fixed exact/partial
and keyword bonuses — so a bound does exist. What matters for the surrounding
argument is only that the bound is not 100, which is what the sentence now
says. The rest of the comment is unchanged.
---------
Co-authored-by: kingpanther13 <25392815+kingpanther13@users.noreply.github.com>1 parent 2fd563c commit 6defbae
2 files changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
364 | 371 | | |
365 | 372 | | |
366 | 373 | | |
| |||
0 commit comments