The NLP Sample is a reference application that showcases the text analytics capability of the Pega 7 Platform. You can analyze text-based content including news feeds, emails, and posts on social media streams such as Facebook, Twitter, and YouTube. This type of information can provide strategic insights and influence enterprise decisions.
The application is included in a special RAP script that you download and import through Designer Studio.
This tutorial explains how to access the NLP Sample application and analyze the text-based content of tweets, Facebook posts, or YouTube metadata.
- Installing the RAP script
- Preparing resources for text analysis
- Analyzing the text-based content from the social media streams and viewing text analytics reports
Go to Designer Studio and import the RAP script that contains the NLP Sample application.
- Download NLPSample.jar.
- Click > > > .
- In the import wizard, click NLPSample.jar. and select
- Click Next, and make sure that the NLPSample.jar file is selected.
- Click Next.
- Click , wait until the import is completed, and click .
- In the menu, click .
- In the Application Access section, add the NLPSample:Administrators access group.
- Click the button to the left of the NLPSample:Administrators access group. This selection makes NLP Sample your default application.
- Log off and log in with the same credentials.
- In the menu, verify that your application switched to NLP Sample.
Before you can analyze the text-based content of tweets, Facebook posts, or YouTube metadata, you must complete the following procedures:
- Create and configure an instance of the Data Set rule that allows you to connect with the Twitter API, Facebook API, or YouTube Data API.
You can also use one of the sample instances of the Data Set rule (Facebook DS, Twitter DS, or YouTube DS) that are delivered in NLPSample.jar, but remember to change its access details. The data sets do not work with the sample access details and can cause errors.
- Create and configure an instance of the Free Text Model rule.
- Create an instance of the Data Flow rule to reference the data set and the Free Text Model rule from the data flow.
For more details, see the following tutorials:
Activate the data flow that you just created and keep it active until it processes some records.
- Click the Application menu in Designer Studio and switch to your application.
- Open the data flow that you created.
- Click Actions > Run.
- In the Data Flow Test Run dialog box, click Activate.
- Wait until the data flow processes some records.
- Click Designer Studio > Text Analytics Reports.
- In the Text Analytics Reports window, you can view different charts that contain the text analytics reports.
You have just completed a text analysis of content from one of the social media streams (Facebook, Twitter, or YouTube). You activated a data flow that references an instance of the Data Set rule and Free Text Model rule. The data set connected to an appropriate API and the Free Text Model rule conducted the text analysis. The results of the analysis are available in the text analytics reports.