feat(config): add new scoring parameters for phrase extraction and matching

This commit is contained in:
Richie committed 2026-07-24 11:38:51 -04:00
1 parent 6a0e71a30d
commit 68c9693711
3 files changed
+15 -11

No files matched your search

+5
View File
@@ -91,6 +91,7 @@ class EbookSearchConfig(BaseSettings):
phrase_min_tokens: int = 2
phrase_max_tokens: int = 5
phrase_max_entity_tokens: int = 8
phrase_yake_top_k: int = 1000
phrase_raw_ngram_min_count: int = 2
phrase_raw_count_score_threshold: int = 3
phrase_raw_count_high_score_threshold: int = 10
@@ -99,6 +100,10 @@ class EbookSearchConfig(BaseSettings):
phrase_target_protected_per_book: int = 100
phrase_default_allow_nested: bool = False
phrase_default_suppress_children: bool = True
phrase_bad_start_score_penalty: float = 10.0
phrase_bad_end_score_penalty: float = 10.0
phrase_multi_source_score_bonus: float = 2.0
phrase_multi_source_min_sources: int = 2
@field_validator("library_paths", mode="before")
@classmethod