Instructions to use MarcusBennevall/sentence-function-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use MarcusBennevall/sentence-function-classifier with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("MarcusBennevall/sentence-function-classifier") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
File size: 1,382 Bytes
279276c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | {
"created_at": "2026-04-29T02:52:45.301316+00:00",
"embedding_model": "sentence-transformers/all-MiniLM-L6-v2",
"labels": [
"declarative",
"exclamatory",
"imperative",
"interrogative",
"optative"
],
"dataset_path": "data\\sentence_function_dataset.csv",
"dataset_size": 125,
"test_size": 0.2,
"metrics": {
"declarative": {
"precision": 0.5,
"recall": 0.4,
"f1-score": 0.4444444444444444,
"support": 5.0
},
"exclamatory": {
"precision": 0.8333333333333334,
"recall": 1.0,
"f1-score": 0.9090909090909091,
"support": 5.0
},
"imperative": {
"precision": 1.0,
"recall": 0.8,
"f1-score": 0.8888888888888888,
"support": 5.0
},
"interrogative": {
"precision": 0.5,
"recall": 0.6,
"f1-score": 0.5454545454545454,
"support": 5.0
},
"optative": {
"precision": 1.0,
"recall": 1.0,
"f1-score": 1.0,
"support": 5.0
},
"accuracy": 0.76,
"macro avg": {
"precision": 0.7666666666666667,
"recall": 0.76,
"f1-score": 0.7575757575757576,
"support": 25.0
},
"weighted avg": {
"precision": 0.7666666666666667,
"recall": 0.76,
"f1-score": 0.7575757575757575,
"support": 25.0
}
}
} |