What is the “Google Natural Language” NLP API?
Google Natural Language is one of the NLP APIs that are integrated with WPSOLR’s NLP API extension.
According to Google Natural Language documentation:
“Natural Language uses machine learning to reveal the structure and meaning of text. You can extract information about people, places, and events, and better understand social media sentiment and customer conversations. Natural Language enables you to analyze text and also integrate it with your document storage on Cloud Storage.”
Create a GCP project with Natural Language API authorization
- Select your GCP projet
- Enter “api dashboard” in the search bar
- Select “Dashboard api & services”
- Click on line “Cloud Natural Language API”
- Click “Enable apis and services”
- Enter “natural language” in the search bar
- Select menu “Cloud Natural Language API”
- Click on “Enable”
- select menu “Credentials” (small key icon)
- Click on “Create credentials”
- Select “Service account”
- Enter the new service account name
- Enter the new service account details
- Click on “Create”
- Just click on “Continue”
- Just click on “Done”
- Edit the new service account
- Click on “Add key”
- Select “json”
- Click on “create”
- The json private key is downloaded on your computer
- Open your key.json and copy its content. It will be used later during the WPSOLR setup.
Active the WPSOLR NLP API extension
- Select the extension menu
- Click the “Activate” checkbox
- Save to activate the extension
Configure the Google Natural Language NLP API
- Click to create an Google Natural Language NLP API configuration
- Enter a name for your Google Natural Language NLP API configuration
- Activate this Google Natural Language NLP API configuration
- Activate the cache for this Google Natural Language NLP API configuration
- Select the provider “Google Natural Language”
- Select the service “Entity Extraction”
- Enter your GCP project json private key (described above)
- Select each index you want to process with this Google Natural Language NLP API configuration
- Select each post types you want to process with this Google Natural Language 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 Google Natural Language 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 Google Natural Language fields fields you want to index
Configure the Google Natural Language fields to use as filters
- Select the filters menu
- Select the Google Natural Language 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