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
| { | |
| "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 | |
| } | |
| } | |
| } |