悲伤熊猫
sad_panda是一颗宝石,具有用于自然语言情感分析的工具:阳性/阴性和情感分类。
情绪范围:“愤怒”,“厌恶”,“欢乐”,“惊奇”,“恐惧”,“悲伤”
极性范围:0至10
安装
将此行添加到您的应用程序的Gemfile中:
gem 'sad_panda'
然后执行:
$ bundle
或将其自己安装为:
$ gem install sad_panda
用法
require 'sad_panda'
SadPanda.emotion('my lobster collection makes me happy!')
=> :joy
SadPanda.polarity('I love cactuses!')
=> 10.0
sad_panda = SadPanda::Emotion.new('my lobster collection makes me h
2021-05-23 17:04:21
79KB
Ruby
1