symfonic.core.learning.phases_entity¶
phases_entity ¶
Moved to :mod:symfonic.capabilities.memory.phases.entity.
Entity linking is on the Deep Sleep roster, so it lives in the capability that composes that roster and is imported back here for the legacy consolidator to call. One phase, one implementation, for as long as both routes ship.
The private helpers travel with it: the shipped per-phase tests import them by name, and a shim re-exporting only the public surface would have moved the code away from the tests that watch it.
RegexHeuristicExtractor ¶
Decision 4.5 default strategy.
Returns kind='other' and confidence=0.4 for all capitalised
tokens (single or whitespace-joined) that pass a small stoplist.
The default confidence_threshold=0.5 therefore filters every
candidate out by design (§16.0 Q2). Users who want regex
extraction must either lower the threshold to 0.4 or switch to
the spaCy / LLM extractor.
build_entity_links
async
¶
build_entity_links(graph: Any, episodic_layer: Any, scope: TenantScope, *, extractor: EntityExtractor, min_mention_count: int = DEFAULT_MIN_MENTION_COUNT, max_episodics_per_run: int = DEFAULT_MAX_EPISODICS_PER_RUN, confidence_threshold: float = DEFAULT_CONFIDENCE_THRESHOLD) -> tuple[int, int]
Phase 12.5 implementation.
Returns (entity_nodes_created, mentions_edges_created).
See design §10 for acceptance contract and §9 for idempotency.
Per §16.0 Q6, emitted edges are entity-to-entity MENTIONS with
co-mention episodic ids on MemoryEdge.source_episodic_ids.