extrai.core package¶
Submodules¶
extrai.core.analytics_collector module¶
extrai.core.base_llm_client module¶
extrai.core.batch_models module¶
extrai.core.batch_pipeline module¶
extrai.core.client_rotator module¶
extrai.core.conflict_resolvers module¶
- class SimilarityClusterResolver(similarity_threshold: float = 0.6, scorer: ~collections.abc.Callable[[str, str], float] = <function levenshtein_similarity>)[source]¶
Bases:
objectResolves conflicts by clustering values based on string similarity. Useful for filtering out outliers (e.g. “War” vs “Christmas”, “Gifts”).
- default_conflict_resolver(path: tuple[str | int, ...], values: list[str | int | float | bool | None], weights: list[float] | None = None) str | int | float | bool | None[source]¶
Default conflict resolution: if no consensus, omit the field.
- prefer_most_common_resolver(_path: tuple[str | int, ...], values: list[str | int | float | bool | None], weights: list[float] | None = None) str | int | float | bool | None[source]¶
Conflict resolution: prefer the most common value. If weights are provided, prefers the value with the highest total weight.