Skip to content

Comprehend

Amazon Comprehend is a natural language processing service that extracts meaning and structure from text. It takes UTF-8 text as input and returns JSON.

Comprehend’s pre-trained models need no training data of your own. They detect:

  • Entities — names of people, places, organisations, items and locations
  • Key phrases — the noun phrases a document is about
  • Sentiment — positive, neutral, negative or mixed for the document as a whole
  • Targeted sentiment — sentiment attached to a specific entity, so that one review can be positive about the delivery and negative about the product
  • Personally identifiable information — addresses, account numbers, phone numbers and similar
  • Dominant language — which language a document is written in, supported across a wider set of languages than the other features
  • Syntax — part of speech for each word

Custom classification trains a classifier on your own labelled examples, so documents can be sorted into categories you define rather than generic ones. Custom entity recognition trains a recogniser on terms specific to your domain — product codes, internal system names, clinical terms.

Both are built with AutoML, so no model architecture work is required. Custom classification and custom entity recognition accept image, PDF and Word files as well as plain text.

Flywheels manage the retraining cycle for custom models: they orchestrate training, evaluation and promotion of new model versions as more labelled data accumulates.

Document clustering groups a corpus into topics based on word frequency, which is useful for organising a large document set when the categories are not known in advance.

Real-time analysis for small workloads through synchronous API calls; asynchronous jobs for large document sets. Custom models served in real time require an endpoint, which is billed from the moment it starts until it is deleted.

  • Contact centre analytics — analysing conversation transcripts, tracking sentiment trends, identifying recurring issues
  • Review analysis — extracting product mentions and the sentiment attached to each
  • Legal and contract processing — locating clauses, extracting parties and dates
  • Financial document analysis — pulling figures and entities out of reports and filings
  • PII redaction — finding personal data in free text before it is stored or shared
  • Comprehend may retain content to improve its pre-trained models. Where that is unacceptable — legal, clinical or otherwise confidential text — check the service FAQ and configure accordingly before sending data.
  • Output can be encrypted with your own KMS key, as can the storage volume attached to the instance running an analysis job.
  • Sentiment is a document-level judgement. For anything beyond a headline metric, use targeted sentiment so the signal is attached to the thing it concerns.