{
  "schema": "leumas.docs.page/1",
  "id": "adapter:domain/review-analyzer",
  "slug": "adapters/domain/review-analyzer",
  "kind": "capabilities",
  "bucket": "package",
  "title": "review-analyzer",
  "name": "Review Analyzer",
  "eyebrow": null,
  "chip": null,
  "summary": "Customer-review intelligence microservice: turn product/app/restaurant/hotel reviews into structured insight. analyze extracts sentiment, a 1-5 star estimate, pros, cons and per-aspect opinions from...",
  "keywords": [
    "review-analyzer",
    "restaurant",
    "hotel",
    "insight",
    "pros",
    "cons",
    "per-aspect",
    "aspects"
  ],
  "audience": "both",
  "funnel": {
    "product": null,
    "cta": null
  },
  "body": "# review-analyzer\n\nCustomer-review intelligence microservice. Turns product / app / restaurant / hotel reviews into\nstructured insight: sentiment, a 1-5 star estimate, pros/cons, per-aspect opinion mining, theme\nclustering across many reviews, and fake-review detection.\n\nEvery tool has a deterministic heuristic core (opinion lexicon with negation + intensifier handling,\naspect-based opinion mining) that runs fully **offline** with no model. `analyze`, `summary` and\n`themes` also try an optional LLM (via `../_shared/llm.js`) and silently fall back to the heuristic —\nresults are tagged `{ mode: 'heuristic' | 'llm' }`. A missing/down model never throws.\n\n## Tools\n\n| Tool | Input | Returns |\n|---|---|---|\n| `analyze` | `{ review }` | `{ sentiment, polarity, rating, stars, pros, cons, aspects, confidence }` |\n| `aspects` | `{ review, feature }` | sentiment toward one named feature (e.g. `battery`, `shipping`) |\n| `summary` | `{ review }` | `{ headline, tldr, rating, keywords, topPro, topCon }` |\n| `starEstimate` | `{ review }` | `{ stars, rating, distribution, confidence }` |\n| `themes` | `{ reviews: [..] }` | top recurring themes with quotes, praised/criticized lists, keywords |\n| `spamLikelihood` | `{ review }` | `{ spamLikelihood, label, isSuspicious, flags }` |\n\n## Usage\n\n```js\nimport pack from './index.js';\n\nawait pack.adapters.analyze({ review: 'Battery life is amazing but the app crashes constantly.' });\n// -> { sentiment:'positive'|... , rating, pros:[...], cons:[...], aspects:[{aspect:'reliability',sentiment:'negative'},...] }\n\npack.adapters.aspects({ review: 'Shipping was super fast, packaging was flimsy.', feature: 'shipping' });\n// -> { feature:'shipping', sentiment:'positive', score, evidence:[...] }\n\nawait pack.adapters.themes({ reviews: ['Great value!', 'Broke after a week', 'Support was rude'] });\n// -> { topThemes:[...], praised:[...], criticized:[...], avgEstimatedRating }\n```\n\nOptions: `{ topN, minMentions, maxQuotes, useLlm:false }` (pass `useLlm:false` to force the offline\ncore and skip the network call).\n\n## DRY boundaries\n\n- Generic tokenize / bag-of-words / readability of arbitrary prose lives in **`nlp`** / **`a-text`**;\n  general keyword extraction in **`seo`**. This pack owns **review-domain** modeling only: opinion\n  polarity, aspect-based opinion mining, star estimation, review-theme clustering, fake-review detection.\n- Aggregate numeric stats (percentiles, anomalies) live in **`numbers`** / **`statistics`** — this pack\n  emits shares/counts, not a stats engine.\n- Self-contained: the only import is `../_shared/llm.js`.\n",
  "source": {
    "path": "shared/engines/adapters/domain/review-analyzer/README.md",
    "blobSha": "",
    "commit": "",
    "committedAt": "",
    "provenance": "no-git",
    "bytes": 2779,
    "hash": "a710f78099cfd7326bc54079d3ba78ee9a08a3ed"
  },
  "urls": {
    "html": "/p/adapters/domain/review-analyzer",
    "json": "/docs/adapters/domain/review-analyzer.json",
    "md": "/docs/adapters/domain/review-analyzer.md"
  },
  "links": {
    "composes": [],
    "usedBy": [],
    "product": [],
    "howTo": [],
    "skills": []
  }
}
