Sentence Similarity
sentence-transformers
Safetensors
English
roberta
feature-extraction
emotion
contrastive-learning
multi-label
text-embeddings-inference
Instructions to use foudil/lens-emotion-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use foudil/lens-emotion-encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("foudil/lens-emotion-encoder") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -22,7 +22,7 @@ This is not a classifier. There are no output labels, no softmax, no categories
|
|
| 22 |
```python
|
| 23 |
from sentence_transformers import SentenceTransformer
|
| 24 |
|
| 25 |
-
model = SentenceTransformer("
|
| 26 |
|
| 27 |
sentences = [
|
| 28 |
"I can't believe how proud I am of everything she's achieved.",
|
|
@@ -108,7 +108,7 @@ EmotionEncoder exceeds the backbone on both out-of-domain datasets on every metr
|
|
| 108 |
```python
|
| 109 |
from sentence_transformers import SentenceTransformer
|
| 110 |
|
| 111 |
-
model = SentenceTransformer("
|
| 112 |
|
| 113 |
corpus = [
|
| 114 |
"I'm devastated. Everything we worked for is gone.",
|
|
@@ -133,7 +133,7 @@ for score, sentence in sorted(zip(scores, corpus), reverse=True):
|
|
| 133 |
```python
|
| 134 |
from sentence_transformers import SentenceTransformer
|
| 135 |
|
| 136 |
-
model = SentenceTransformer("
|
| 137 |
|
| 138 |
pairs = [
|
| 139 |
("I'm furious. This is completely unacceptable.", "She makes me so angry I can't think straight."),
|
|
@@ -168,8 +168,6 @@ for a, b in pairs:
|
|
| 168 |
|
| 169 |
**GoEmotions label noise.** Inter-annotator agreement varies across emotion categories. Categories with low agreement or few examples yield less reliable geometry.
|
| 170 |
|
| 171 |
-
**Calibration residual.** Boundary ECE on GoEmotions is 0.421 vs. 0.416 for the mpnet calibration reference. Post-hoc temperature or Platt scaling can close this if precise probability estimates matter.
|
| 172 |
-
|
| 173 |
**No valence axis.** The model encodes full emotional profiles, not sentiment polarity. It is not optimised as a sentiment analyser.
|
| 174 |
|
| 175 |
---
|
|
|
|
| 22 |
```python
|
| 23 |
from sentence_transformers import SentenceTransformer
|
| 24 |
|
| 25 |
+
model = SentenceTransformer("foudil/lens-emotion-encoder")
|
| 26 |
|
| 27 |
sentences = [
|
| 28 |
"I can't believe how proud I am of everything she's achieved.",
|
|
|
|
| 108 |
```python
|
| 109 |
from sentence_transformers import SentenceTransformer
|
| 110 |
|
| 111 |
+
model = SentenceTransformer("foudil/lens-emotion-encoder")
|
| 112 |
|
| 113 |
corpus = [
|
| 114 |
"I'm devastated. Everything we worked for is gone.",
|
|
|
|
| 133 |
```python
|
| 134 |
from sentence_transformers import SentenceTransformer
|
| 135 |
|
| 136 |
+
model = SentenceTransformer("foudil/lens-emotion-encoder")
|
| 137 |
|
| 138 |
pairs = [
|
| 139 |
("I'm furious. This is completely unacceptable.", "She makes me so angry I can't think straight."),
|
|
|
|
| 168 |
|
| 169 |
**GoEmotions label noise.** Inter-annotator agreement varies across emotion categories. Categories with low agreement or few examples yield less reliable geometry.
|
| 170 |
|
|
|
|
|
|
|
| 171 |
**No valence axis.** The model encodes full emotional profiles, not sentiment polarity. It is not optimised as a sentiment analyser.
|
| 172 |
|
| 173 |
---
|