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" />
| Prop | Type | Default | Description |
|---|---|---|---|
reviews | Review[] | (required) | Array of review objects with comment (or text) field. |
limit | number | 8 | Maximum number of terms to display. |
How it works
useMentionedTerms does the heavy lifting:
- Tokenize each review's comment (lowercase, split on non-letter chars)
- Filter out stopwords (the, a, an, and, of, with, ...) and short words (< 4 chars)
- Filter pure numbers
- Count frequency
- 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.
