Skip to main content

Module entity_extraction

Module entity_extraction 

Source
Expand description

Entity extraction for automatic identity linking

Provides lightweight Named Entity Recognition (NER) for:

  • @mentions (e.g., @ronaldo, @acme-corp)
  • Email addresses
  • URLs with domain extraction
  • Capitalized names (simple heuristic)
  • Known identity aliases (database lookup)

§Invariants

  • Extraction never panics on any input
  • Empty/whitespace input returns empty results
  • Duplicate mentions are deduplicated with count
  • Results are sorted by first occurrence position

§Performance

  • Regex patterns are compiled once (lazy_static)
  • Single pass through text for pattern matching
  • Bounded output: max 100 entities per text

Structs§

ExtractedEntity
An extracted entity from text
ExtractionConfig
Configuration for entity extraction
ExtractionResult
Result of entity extraction

Enums§

ExtractedEntityType
Type of extracted entity

Functions§

auto_link_memory
Auto-link entities found in a memory’s content to identities.
extract_entities
Extract entities from text content.