What is the “Amazon Comprehend” NLP API?
Amazon Comprehend is one of the NLP APIs that are integrated with WPSOLR’s NLP API extension.
According to Amazon Comprehend documentation:
“Amazon Comprehend uses natural language processing (NLP) to extract insights about the content of documents without the need of any special preprocessing. Amazon Comprehend processes any text files in UTF-8 format. It develops insights by recognizing the entities, key phrases, language, sentiments, and other common elements in a document.
Due to API limits, each document text is truncated to 5000 bytes in UTF-8.”
Create a user with Amazon Comprehend access
- Add amazon-comprehend permissions to your Amazon user
- Get the API key and secret from your user credentials tab
Active the WPSOLR NLP API extension
- Select the extension menu
- Click the “Activate” checkbox
- Save to activate the extension
Configure the Amazon Comprend NLP API
- Click to create an Amazon Comprehend NLP API configuration
- Enter a name for your Amazon Comprehend NLP API configuration
- Activate this Amazon Comprehend NLP API configuration
- Activate the cache for this Amazon Comprehend NLP API configuration
- Select the provider “Amazon Comprehend”
- Select the service “Entity Extraction”
- Enter your Amazon access key ID
- Enter your Amazon secret access key
- Enter your Amazon region
- Enter your texts language
- Select each index you want to process with this Amazon Comprehend NLP API configuration
- Select each post types you want to process with this Amazon Comprehend NLP API configuration (only the post types selected in WPSOLR screen 2.2 previously will show up here)
- Save
Configure the WPSOLR search
- Select the search menu
- Select the presentation menu
- Activate the search with WPSOLR
Configure the Amazon Comprehend fields to index
- Select the search menu
- Select the index menu
- Select the post types you want to index (containing the texts to extract)
- Select the Amazon Comprehend fields fields you want to index
Configure the Amazon Comprehend fields to use as filters
- Select the filters menu
- Select the Amazon Comprehend fields fields you want to use as filters
Add WPSOLR facets widget to your search sidebar
- Add the WPSOLR facets widget
Create a post with some interesting text to extract
Make a search and use extracted fields as filters
- Filter by persons
- Filter by location