classifyText

public final static String classifyText(ClassificationRequest request, String text)

Classifies caller-supplied text against the candidate labels carried by (zero-shot) with no document. The text is scored directly by the text branch and the image branch is skipped, so nothing is rendered and no file is opened — use this when you already have the text (an email body, a database field, your own extraction pipeline) rather than a document on disk.

Return

JSON with the predicted label and the ranked candidate probabilities.

Parameters

request

The classification request carrying at least two candidate labels.

text

The text to classify.