2023-11-08 08:50:37 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-11-08 12:58:35 -05:00
|
|
|
Fabricator(:classification_result) do
|
|
|
|
target { Fabricate(:post) }
|
|
|
|
classification_type "sentiment"
|
|
|
|
end
|
2023-11-08 08:50:37 -05:00
|
|
|
|
|
|
|
Fabricator(:sentiment_classification, from: :classification_result) do
|
2024-11-04 07:14:34 -05:00
|
|
|
model_used "cardiffnlp/twitter-roberta-base-sentiment-latest"
|
|
|
|
classification { { negative: 0.72, neutral: 0.23, positive: 0.4 } }
|
2023-11-08 08:50:37 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:emotion_classification, from: :classification_result) do
|
2024-11-04 07:14:34 -05:00
|
|
|
model_used "j-hartmann/emotion-english-distilroberta-base"
|
|
|
|
classification do
|
|
|
|
{ sadness: 0.72, surprise: 0.23, fear: 0.4, anger: 0.87, joy: 0.22, disgust: 0.70 }
|
|
|
|
end
|
2023-11-08 08:50:37 -05:00
|
|
|
end
|