"Sentiment" (Built-in Classifier)

Determine the sentiment of a text from a snippet.

Classes

    Out[1]//Short=

Details

  • This classifier attempts to infer the sentiment that a snippet of text conveys.
  • The input text should typically be one or a few sentences.
  • This classifier assumes the text conveys only one sentiment. The probabilities reflect the belief in these sentiments, not the proportion of sentiments.
  • The current version only works for the English language.

Examples

open allclose all

Basic Examples  (2)

Use the "Sentiment" built-in classifier to infer the sentiment of a review:

In[1]:=
Click for copyable input
Out[1]=

Classify multiple examples:

In[2]:=
Click for copyable input
Out[2]=

Obtain the probabilities for the possible classes:

In[3]:=
Click for copyable input
Out[3]=

Obtain a ClassifierFunction for this classifier:

In[1]:=
Click for copyable input
Out[1]=

Apply the classifier to a list of examples:

In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Options  (2)

See Also

Classify  NetModel  TextRecognize  TextCases  TextSentences  WolframLanguageData  Snippet

Related Models