X Enterprises
Profile

XRDProfileMentionedTerms

Mentioned by reviewers

XRDProfileMentionedTerms

Auto-generated tag cloud showing the most-mentioned meaningful terms from a restaurant's reviews. Surface-level "what people talk about" summary without needing NLP — just word-frequency analysis with stopword filtering.

Usage

<XRDProfileMentionedTerms :reviews="reviews" :limit="8" />
PropTypeDefaultDescription
reviewsReview[](required)Array of review objects with comment (or text) field.
limitnumber8Maximum number of terms to display.

How it works

useMentionedTerms does the heavy lifting:

  1. Tokenize each review's comment (lowercase, split on non-letter chars)
  2. Filter out stopwords (the, a, an, and, of, with, ...) and short words (< 4 chars)
  3. Filter pure numbers
  4. Count frequency
  5. Return top N by count (ties broken alphabetically)

Display

Renders a row of UBadge chips:

Mentioned by reviewers   pasta ·7   hidden ·2   wonderful ·2   ambiance ·1   ...

When fewer than 1 review has any meaningful terms, the component renders nothing.

Customization

To customize the stopword list, edit STOPWORDS in app/composables/useMentionedTerms.ts. To change the minimum word length, pass limit or fork the composable.


AI Context

component: XRDProfileMentionedTerms
package: "@xenterprises/nuxt-x-restaurants"
use-when: >
  Showing "what reviewers talk about" as a tag cloud above the reviews
  list. Uses word-frequency analysis with stopword filtering — no NLP
  needed. Pure client-side, fully reactive.
Copyright © 2026