mirror of
https://github.com/safishamsi/graphify.git
synced 2026-09-22 21:45:58 +00:00
PR #1918 replaced _pick_seeds(terms=) with best_seed_by_term= from _score_query. Update the #1900 German-stopword seed test to the new single-traversal API and add the missing trailing newline in the (manual, non-collected) query-scoring benchmark. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ff999a909a
commit
c0875ccae9
@@ -277,4 +277,4 @@ def main(argv: list[str] | None = None) -> int:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
sys.exit(main())
|
||||
|
||||
+5
-1
@@ -393,7 +393,11 @@ def test_pick_seeds_german_query_seeds_content_node_not_heading_noise():
|
||||
|
||||
q = "Wie funktioniert die Authentifizierung?"
|
||||
terms = _query_terms(q)
|
||||
seeds = _pick_seeds(_score_nodes(G, terms), G=G, terms=terms)
|
||||
# #1918: _score_query does combined scoring + per-term singleton winners in
|
||||
# one traversal; _pick_seeds consumes best_seed_by_term for the per-term
|
||||
# guarantee (replaces the old terms= per-term rescoring).
|
||||
qs = _score_query(G, terms, collect_per_term_seeds=True)
|
||||
seeds = _pick_seeds(qs.ranked, G=G, best_seed_by_term=qs.best_seed_by_term)
|
||||
assert "auth" in seeds
|
||||
assert "cfg" not in seeds
|
||||
assert "sec" not in seeds
|
||||
|
||||
Reference in New Issue
Block a user