Brightspot Integrations Guide
Brightspot Integrations Guide
Built-in integrations

Amazon Comprehend


Editors use tags and sections to group assets into categories. When an asset has a tag, visitors can click on the tag and view a list of other assets associated with that tag.

Asset with tag Asset with tag
Asset with tag

You can manually associate tags and sections with your assets, a labor-intensive effort if you create dozens of assets every day. You can instead automatically generate tags and sections by integrating Amazon Comprehend with Brightspot. Brightspot sends the text in your asset to Amazon Comprehend, and subsequently receives the suggested tags. You can then accept or reject the suggestions, and add your own tags and sections as necessary.

Amazon Comprehend suggestions Amazon Comprehend suggestions
Amazon Comprehend suggestions

Referring to the previous example, Amazon Comprehend analyzed the body text, and returned suggested terms for sections and tags such as Gulf Stream, North Atlantic, and Gulf of Mexico.

Including Amazon Comprehend in a Brightspot build

The following table lists the dependencies to include in your build configuration.

ArtifactDescription
com.psddev:suggestions-comprehendExposes Amazon Comprehend as a suggestions provider.
com.psddev:suggestions-coreExposes the SuggestionProvider interface that manages the interaction between Brightspot and Amazon Comprehend.

Runtime prerequisites

  • Developer configuration
    • Classes that editors send to Amazon Comprehend must implement the Suggestable interface.
    • Fields that are assigned suggested terms must be specified in a class-level @SuggestionsInitField annotation. For example, to assign a suggestion to the field Tag.displayName, ensure the class Tag is annotated with @SuggestionsInitField("displayName").
    • If the field being assigned a suggested term is a class, annotate the class with @ToolUi.Suggestions.
    • The following code samples provide a comprehensive example:
      @SuggestionsInitField("baz")
      public class Foo {
          private String baz;
      }
      • Assigns a suggestion to the field baz.
      public class Bar implements Suggestable {
          @ToolUi.Suggestions
          private Foo foo;
      
          private String text;
      
          String getSuggestableText() {
              return text;
          }
      }
      • Enables instances of Bar to be sent to Amazon Comprehend.
      • Assigns suggested text to the associated instance of Foo.
    • In standard versions of Brightspot, these annotations are already implemented for Section.displayName and Tag.displayName.
  • Ops configuration—Configure a policy and role in your AWS console. For details, see Configuring a Comprehend policy and role in AWS.
  • CMS configuration—Configure the site interfacing with Amazon Comprehend. For details, see Configuring the Comprehend integration.

See also:

Previous Topic
Searching for and using an Adobe Stock image
Next Topic
Configuring the Comprehend integration
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Modules
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

Dashboards
Publishing
Workflows
Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Shopify
Apple News