Model za Detekciju i Vektorizaciju Emocija na Srpskom Jeziku355 Miliona Parametara zasnovan na jerteh/Jerteh-355 model.
Fine-tunovan za regresiju 16 dimenzionalnog prostora emocija (8 ispoljenih emocija i 8 evociranih emocija).
Obučen na preko 30.000 anotiranih primera iz Reddit i Twitter korpusa na srpskom jeziku.
Integrisan kao nativni SentenceTransformer pipeline za jednostavnu inferenciju bez dodatnih klase definicija.
|
Serbian Emotion and Evocation Vector Embedding Model355 Million Parameters fine-tuned on top of the jerteh/Jerteh-355 base.
Designed for 16-dimensional emotion vector regression (8 base emotions & 8 evocation emotions).
Trained on over 30,000 annotated samples from Serbian Reddit and Twitter datasets.
Exported directly as a native SentenceTransformer module for instant inference.
| ||||||||
|
sentence_transformers biblioteke:1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer("procesaur/Emo355")
4test_sentences = [
5 "Nisam siguran šta će se desiti sutra, ali se nadam najboljem."
6 "Ovo je nedopustivo! Kakav užasan uspeh i sramota za celu zemlju.",
7 ]
8
9# Get 16-dimensional emotion vector predictions directly
10predictions = model.encode(test_sentences)
11
12LABELS = [
13 # 8 Base
14 "anger", "anticipation", "disgust", "fear",
15 "joy", "sadness", "surprise", "trust",
16 # 8 Evocation
17 "evoc_anger", "evoc_anticipation", "evoc_disgust", "evoc_fear",
18 "evoc_joy", "evoc_sadness", "evoc_surprise", "evoc_trust"
19]
20
21for text, pred in zip(test_sentences, predictions):
22 print(f"\nText: {text}")
23 scores = dict(zip(LABELS, pred.tolist()))
24 for k, v in scores.items():
25 print(f" {k:<20}: {v:.4f}")Text: Nisam siguran šta će se desiti sutra, ali se nadam najboljem.
anger : 0.0026
anticipation : 0.4779
disgust : 0.0189
fear : 0.0056
joy : 0.2393
sadness : 0.1392
surprise : 0.1545
trust : 0.0844
evoc_anger : 0.2122
evoc_anticipation : 0.2360
evoc_disgust : -0.0765
evoc_fear : 0.0729
evoc_joy : 0.3163
evoc_sadness : 0.1806
evoc_surprise : 0.1333
evoc_trust : 0.0023
Text: Ovo je nedopustivo! Kakav užasan uspeh i sramota za celu zemlju.
anger : 0.5147
anticipation : 0.0130
disgust : 0.1701
fear : 0.0393
joy : 0.0718
sadness : 0.0931
surprise : 0.1342
trust : 0.0176
evoc_anger : 0.4144
evoc_anticipation : 0.0837
evoc_disgust : -0.0117
evoc_fear : 0.0504
evoc_joy : 0.0973
evoc_sadness : 0.1900
evoc_surprise : 0.1695
evoc_trust : 0.01491import matplotlib.pyplot as plt
2import numpy as np
3import base64
4from io import BytesIO
5
6def plot_radar_chart(embedding, labels, color="blue", title=""):
7 plt.rcParams["font.family"] = "Times New Roman"
8 num_vars = len(embedding)
9 angles = np.linspace(0, 2 * np.pi, num_vars, endpoint=False).tolist()
10 angles += angles[:1] # Complete the loop
11 fig, ax = plt.subplots(figsize=(5, 5), subplot_kw=dict(polar=True))
12
13 ax.set_title(title, fontdict={"fontsize": 20, "fontweight": "bold"}, loc="left")
14
15 ax.set_theta_offset(np.pi / 2)
16 ax.set_theta_direction(-1)
17 ax.set_xticks(angles[:-1])
18 plt.xticks(angles[:-1], labels, size=20)
19 plt.yticks([0.1, 0.5, 1, 2], ["0.1", "0.5", "1", "2"], color="grey", size=10)
20 plt.ylim(0, 1)
21
22 embedding.append(embedding[0])
23 embedding = [0 if x<0 else x for x in embedding]
24 ax.plot(angles, embedding, linewidth=2, linestyle='solid')
25 ax.fill(angles, embedding, color=color, alpha=0.25)
26 plt.legend(loc='upper right', bbox_to_anchor=(0.1, 0.1))
27
28 buffer = BytesIO()
29 fig.savefig(buffer, format="png")
30 buffer.seek(0)
31 img_base64 = base64.b64encode(buffer.read()).decode("utf-8")
32 return f'<img src="data:image/png;base64,{img_base64}" />'
33
34scores = list(predictions[1].squeeze())
35print(plot_radar_chart(scores[0:8], LABELS[0:8], "blue", "emotion") + plot_radar_chart(scores[8:16], LABELS[8:16], "green", "evocation"))1@inproceedings{vskoric2025embedding,
2 title={Embedding Text in Emotion and Evocation Vector Spaces},
3 author={{\v{S}}kori{\'c}, Mihailo and Stankovi{\'c}, Ranka},
4 booktitle={ReLDI 2025 Synergies},
5 pages={63-67},
6 year={2025}
7}
|
Истраживање jе спроведено уз подршку Фонда за науку Републике Србиjе, #7276, Text Embeddings – Serbian Language Applications – TESLA
|
This research was supported by the Science Fund of the Republic of Serbia, #7276, Text Embeddings - Serbian Language Applications - TESLA
|