feat(ebook-search): implement async phrase matching for chunks and add ChunkPhraseHit model
This commit is contained in:
1 parent
e010756e09
commit
9f126fedc7
4 files changed
+74
-28
No files matched your search
@@ -131,6 +131,21 @@ class PhraseMatch:
|
||||
series_id: int | None = None
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class ChunkPhraseHit:
|
||||
"""One protected phrase with its mention count inside one retrieved chunk.
|
||||
|
||||
Attributes:
|
||||
phrase_id (int): Protected phrase id.
|
||||
phrase_text (str): Display text for the phrase.
|
||||
mention_count (int): Indexed mentions inside the chunk.
|
||||
"""
|
||||
|
||||
phrase_id: int
|
||||
phrase_text: str
|
||||
mention_count: int
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class PhraseCandidateGenerationResult:
|
||||
"""Summary of candidate phrase extraction for indexed books.
|
||||
|
||||
Reference in new issue
Block a user