"Sentiment(内置分类器)" (内置分类器)
"Sentiment(内置分类器)" (内置分类器)
根据片段确定文本的情绪.
类别
范例
打开所有单元 关闭所有单元基本范例 (2)
Classify["Sentiment", "I enjoy working in this company"]Classify["Sentiment", {"I am so sad", "My phone broke again", "I love this movie"}]Classify["Sentiment", "There is nothing good about the fellas in this movie", "Probabilities"]获取该分类器的 ClassifierFunction:
c = Classify["Sentiment"]c[{"I love this movie", "I am so sad", "My phone broke again"}]范围 (1)
加载对应分类器的 ClassifierFunction:
c = Classify["Sentiment"]Information[c, "Classes"]选项 (2)
ClassPriors (1)
使用自定义的 ClassPriors 限制可能的输出:
Classify["Sentiment", "There is nothing good about the fellas in this movie", ClassPriors -> <|"Negative" -> 0.5, "Neutral" -> 0.5|>]IndeterminateThreshold (1)
使用自定义的 IndeterminateThreshold:
Classify["Sentiment", "There is nothing good about the fellas in this movie", IndeterminateThreshold -> 0.7]相关指南
-
▪
- 机器学习
历史
2018年引入 (11.3)