Function extractEntities

  • Extract entity labels from free-form text.

    Applies five regex pattern families, filters single-word sentence-start stopwords, normalizes whitespace, dedupes by exact match, and caps at MAX_ENTITIES_PER_TEXT.

    Parameters

    • text: string

      Free-form text (chunk content, query, etc.).

    Returns string[]

    Deduplicated array of entity labels in document order.