BLOCKS Reference

Watson

Classify text

Overview

This BLOCK is currently in beta and will become unavailable post official release. Please use the official version once it is released.

As a beta release, there is the possibility that some functions may not execute properly. We appreciate feedback from users regarding bugs or ways to improve BLOCKS.

Your IBM Cloud account must be configured to allow use of the Natural Language Classifier service in order to use this BLOCK. You must also have Natural Language Classifier service credentials.

This BLOCK allows you to use Classify from the IBM Watson Natural Language Classifier API from BLOCKS.

With this BLOCK, you can use a trained classifier to analyze untrained text and classify its intent (② in the image below). It classifies the data as the most appropriate class from among the ones set during the training.

Classify text BLOCK placement example

The following example shows the results of classifying the sentence, “Today is cold, isn’t it?”

{
  "classifier_id": "e55175x249-nlc-51930",
  "text": "Today is cold, isn’t it?",
  "top_class": "temperature",
  "classes": [
    {
      "class_name": "temperature",
      "confidence": 0.9733634159663508
    },
    {
      "class_name": "conditions",
      "confidence": 0.026636584033649123
    }
  ]
}
  • "top_class": The class with the highest confidence score.
  • "classes": A list of all classes ordered from highest to lowest "confidence" score.

Properties

Property Explanation
BLOCK name

Configure the name displayed on this BLOCK

Username

The value of "username" from your Natural Language Classifier service credentials (as shown below).

Service credentials username example

(Click image to enlarge)

Password

The value of "password" from your Natural Language Classifier service credentials (as shown below).

Service credentials password example

(Click image to enlarge)

Classifier ID

Designate the ID of the classifier to be used for the classification.

Variable containing text to classify

Designate the variable that contains the text you want to classify.

Variable to contain results

Designate the variable that will contain the results of the classification.

BLOCK memos

Make notes about this BLOCK.

この情報は役に立ちましたか?