237 Downloads Updated 5 months ago
Updated 5 months ago
5 months ago
d4d325d1256a · 2.6GB ·
These models are customized to provide sentiment analysis in the form a json objects, they also supports aspect sentiment by pre-pending <aspec> to the give text.
{
"type": "object",
"properties": {
"sentiment": {
"description": "A floating-point number representing the sentiment of the text, ranging from -1.0 (negative) to 1.0 positive and 0.0 being neutral",
"type": "number",
"maximum": 1.0,
"minimum": -1.0
},
"confidence": {
"description": "A floating-point representation of how confident you are about this sentiment, ranging from 0.0 (not confident) to 1.0 (certain)",
"type": "number",
"maximum": 1.0,
"minimum": 0
},
"reasoning": {
"description": "An optional brief reasoning of the logic used to determine the numeric sentiment value",
"type": "string"
}
},
"required": [
"sentiment",
"confidence"
]
}
curl -s http://localhost:11434/api/generate -d '{
"model": "pilardi/sentiment-analysis:gemma3",
"prompt": "I love my pizza without pinapples",
"stream": false,
"format": "json"
}' | jq -c ".response | fromjson"
Response
{"sentiment":0.90,"confidence":0.95,"reasoning":"The text expresses a strong positive sentiment towards pizza, explicitly stating a preference against pineapple."}
curl -s http://localhost:11434/api/generate -d '{
"model": "pilardi/sentiment-analysis:gemma3",
"prompt": "<pinapples>I love my pizza without pinapples",
"stream": false,
"format": "json"
}' | jq -c ".response | fromjson"
Response:
{"sentiment":-1.0,"confidence":0.95,"reasoning":"The text expresses a clear dislike for pineapple on pizza."}