Zero Shot Text Classifier

The node performs Zero-Shot Text Classification based on NLI task. No prior training is needed, user can just provide a set of labels that are expected to be used for text classification.
The node can use a model trained on an NLI task. It works by posing each candidate label as a 'hypothesis' and the sequence which one wants to classify as the 'premise'.

Options

Settings

Sentence column
A column with a plain text (String), which contains the text to be classified. No special pre-processing is needed.
Candidate labels
A set of labels to use for prediction.
E.g : Positive;Negative
Use custom labels separator
If active, it is possible to change the character used to separate different candidate labels.
Use custom hypothesis
If active, it is possible to change the hypothesis used as an input to the model. Otherwise the default hypothesis will be used.
Batch size
The number of samples that are passed to the model at once for one batch. It highly depends on the RAM or VRAM.
Change prediction column name
If active a column with provided name will be created in the output table. Otherwise the default name will be used for the column with predictions.
Append individual class probabilities
If active, the columns with class probabilities will be created in the output table.

Multi-label

Multi-label classification
If active, it is possible to change the probability threshold for assigning the class or the number of desired classes. By default one class is assigned by the biggest probability value.
Use custom threshold for assigning the classes
If active, it is possible to change the probability threshold for assigning the class. By default class is assigned by the biggest probability value.
Probability threshold
The class is assigned if the class probability is equal or higher then the value. Several classes might be assigned.
Fixed number of classes per prediction
If active, it it possible to change the number of assigned classes per prediction.
Number of classes per prediction
The number of classes that will be assigned to the prediction.

Python

Python
Select one of Python execution environment options:
  • use default Python environment for Deep Learning
  • use Conda environment

Input Ports

Icon
BERT Model
Icon
Data Table

Output Ports

Icon
Output table

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.