Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

With a proper set of hypotheses labels describing the labels of the classification task, the model can infer by semantic similarity how to categorize a text sequence without having been explicitly trained for that task. For example, a sentiment analysis task could be formatted as follows:

...

For the ease of use, we can create pattern templates with a curly-bracket placeholder for replacing the corresponding label each time. In the example above, it would have been This person expresses a {} sentiment.

Parameters

Parameter

Description

model

The language model to use. Call GET /zero-shot/ for the models available.

Choose symanto_brain_multilingual only if there is no specific language model for your selected languauge.

all

If true only returns the most probable label. Otherwise it returns all of them.

multi_label

If false, returned probability distribution among provided labels for each instance will sum up to 1. Otherwise it will be unnormalized.

Examples

Please head over to Use Case Examples to view some common use cases and their configurations.