Skip to main content

Highlighting Entities in the SBA Preview

In this chapter, you will highlight entities in the Mint document preview.

Backend Configuration

When indexing data, you have to set up entities for extraction, which are stored in the Sinequa index(es).

note

In the Sinequa demo server, there are multiple entities extracted for you.

In this exercise, you will highlight two entities: entity13, using the column alias exectitle, and entity14, using the column alias finance.

As a reminder, use of column aliases is a best practice, and they are created in the Mint Query Web Service.

Additionally, a Preview Web Service must be configured to define the highlights to display. This web service is then attached to your app.

Preview Web Service

Modifying the highlight.config.ts File

  1. Go to src > app > highlight.config.ts.

  2. Add the following to the PREVIEW_HIGHLIGHTS constant:

    {
    name: 'exectitle',
    color: 'black',
    bgColor: '#F5DCD5'
    },
    {
    name: 'finance',
    color: 'black',
    bgColor: '#59ED78'
    },
  3. Save your changes.

note

If you followed the Connecting to Sinequa tutorial, Mint should recompile automatically. If not, run the npm run start command in the terminal.

  1. Go to your Mint application and execute a search for Morgan Stanley.

  2. Click on the first result (anywhere other than the title) to display the HTML document preview.

HTML document preview

  1. In the preview panel, toggle entity higlighting on by clicking the lightbulb icon.
note

You should see finance terms (e.g., investment, revenue) highlighted in green:

Finance entities highlighted

You should also see executive titles (e.g., CEO, chief operating officer) highlighted in pink:

Executive Title entities highlighted