feat(config): add new scoring parameters for phrase extraction and matching
This commit is contained in:
@@ -159,6 +159,11 @@ def test_score_candidate_rewards_multiple_non_raw_sources(config: EbookSearchCon
|
||||
|
||||
assert score_candidate(multi_source, config) == score_candidate(single_source, config) + 2.0 + 2.0
|
||||
|
||||
tuned_config = config.model_copy(
|
||||
update={"phrase_multi_source_min_sources": 2, "phrase_multi_source_score_bonus": 3.0}
|
||||
)
|
||||
assert score_candidate(multi_source, tuned_config) == score_candidate(single_source, tuned_config) + 2.0 + 3.0
|
||||
|
||||
|
||||
def test_score_candidate_caps_frequency_contribution(config: EbookSearchConfig) -> None:
|
||||
"""Very frequent raw-only phrases should no longer out-score sourced entities."""
|
||||
|
||||
Reference in New Issue
Block a user