Skip to content

API Reference parrot_pipelines.planogram.comparison.identity

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_pipelines.planogram.comparison.identity

View source

Shared, descriptor-aware identity resolution: photo evidence -> one catalogue product id (FEAT-612).

Attribute ALIAS_MIN_RATIO

Attribute DEFAULT_REQUIRED_FIELDS

Type: Tuple[str, ...]

Attribute DEFAULT_VOCABULARY

Type: Tuple[str, ...]

Alias Descriptors

Re-exported from parrot_pipelines.planogram.comparison.definition.Descriptors.

Alias FacingDefinition

Re-exported from parrot_pipelines.planogram.comparison.definition.FacingDefinition.

Alias Identification

Re-exported from parrot_pipelines.planogram.contracts.Identification.

Alias SlotsDefinition

Re-exported from parrot_pipelines.planogram.comparison.definition.SlotsDefinition.

Function names_product

Whether read text names a catalogue product (the product id appears in it as whole tokens).

names_product(text: Optional[str], product: Optional[str]) -> bool

Parameter Type Default Description
text Optional[str]
product Optional[str]

Returns: bool

Function resolve_identity

Resolve photo evidence to one catalogue id, or return unresolved candidates.

Rules run in order: exact identifier, descriptor signature, a catalogue name contained in the read name, and fuzzy alias. Expected-empty facings never participate, and no expected slot is used to select an identity.

resolve_identity(identification: Identification, definition: SlotsDefinition, *, vocabulary: Sequence[str] = DEFAULT_VOCABULARY, required_fields: Sequence[str] = DEFAULT_REQUIRED_FIELDS) -> tuple[str | None, list[str]]

Parameter Type Default Description
identification Identification What the model or OCR read for one observed target.
definition SlotsDefinition The slots definition containing the catalogue products.
vocabulary Sequence[str] DEFAULT_VOCABULARY Descriptor fields compared for contradictions.
required_fields Sequence[str] DEFAULT_REQUIRED_FIELDS Fields whose observation gates signature resolution.

Returns: tuple[str | None, list[str]] — A resolved product and its candidate list, or (None, candidates).

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally