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: object

Resolves 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.

levenshtein_similarity(a: str, b: str) float[source]
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.

extrai.core.entity_counter module

extrai.core.errors module

extrai.core.example_json_generator module

extrai.core.extraction_config module

extrai.core.extraction_context_preparer module

extrai.core.extraction_pipeline module

extrai.core.extraction_request_factory module

extrai.core.hierarchical_extractor module

extrai.core.json_consensus module

extrai.core.llm_runner module

extrai.core.model_registry module

extrai.core.model_wrapper_builder module

extrai.core.prompt_builder module

extrai.core.result_processor module

extrai.core.schema_inspector module

extrai.core.sqlmodel_generator module

extrai.core.workflow_orchestrator module

Module contents