Natural Language Understanding enables advanced text analysis through natural language processing. The service analyzes unstructured text to extract metadata such as entities, general concepts, keywords, categories, relations, sentiment, and emotion. With custom annotation models developed using Watson Knowledge Studio, you can further customize the service to identify domain-specific entities and relations in your content.
The Node-RED
provides an easy to use wrapper that you can extract meta-data from content. You can analyse external URLs, HTML files or text content.
In this exercise we will show you how to use the node to extract data from a webpage and simple text.
To get the NLU service credentials on IBM Cloud automatically filled in by Node-RED, you should connect the NLU service to the Node-RED application.
Please refer to the Node-RED setup lab for instructions.
Add the following nodes from the palette to your flow canvas.
- Two Inject nodes.
- A Natural Language Understanding node.
- A Debug node.
Wire the nodes together like so:
The first inject node will be used to inject a url into the flow. The example uses the standard IBM US site: https://www.ibm.com/us-en/
The second inject node will be used to inject text into the flow. Any text can be used, for example:
This is the sample text on which I want some understanding.
Configure the Natural Language Understanding node for the service features that you want to detect. As you select the items you require, the node menu will expand with additional options.
Configure the debug node to show the complete msg object.
Deploy the application and initiate both inject nodes. The output from the URL inject should look like:
and the output from the Text inject should look like:
From the debug tab, you can drill down into the keywords and categories etc.
The complete flow is available here.
To find more information on the Watson Natural Language Understanding underlying service, visit these webpages:







