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: 825 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 | ---
language: en
tags:
- sentence-classification
- sentence-transformers
- text-classification
library_name: scikit-learn
---
# Sentence Function Classifier
This model classifies English sentences as: declarative, exclamatory, imperative, interrogative, optative.
It embeds sentences with `sentence-transformers/all-MiniLM-L6-v2` and predicts the final
class with a logistic regression classifier trained on a balanced seed dataset.
## Intended Use
This is designed for educational demos and lightweight sentence-function
analysis. It is not intended as a grammar authority for high-stakes assessment.
## Evaluation
- Dataset size: 125
- Held-out test split: 0.2
- Accuracy: 0.760
The seed dataset is small, so the metrics should be treated as a smoke test
rather than a final benchmark.
|