File size: 2,581 Bytes
8758d51 9eb6ee6 8758d51 c344cad f0cd049 8758d51 f0cd049 f8314c5 220304b 5edef03 87f2b37 220304b 87f2b37 77f9e05 87f2b37 77f9e05 87f2b37 d9c50cc b578004 2a3cc95 b578004 092bbad b578004 092bbad b578004 d9c50cc 87f2b37 2c197b8 e59beb2 2c197b8 e59beb2 8758d51 |
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
---
license: apache-2.0
inference: false
datasets: google_wellformed_query
---
```DOI
@misc {ashish_kumar_2024,
author = { {Ashish Kumar} },
title = { query_wellformedness_score (Revision 55a424c) },
year = 2024,
url = { https://huggingface.co/Ashishkr/query_wellformedness_score },
doi = { 10.57967/hf/1980 },
publisher = { Hugging Face }
}
```
**Intended Use Cases**
*Content Creation*: Validate the well-formedness of written content.
*Educational Platforms*: Helps students check the grammaticality of their sentences.
*Chatbots & Virtual Assistants*: To validate user queries or generate well-formed responses.
**contact: [email protected]**
**Model name**: Query Wellformedness Scoring
**Description** : Evaluate the well-formedness of sentences by checking grammatical correctness and completeness. Sensitive to case and penalizes sentences for incorrect grammar and case.
**Features**:
- *Wellformedness Score*: Provides a score indicating grammatical correctness and completeness.
- *Case Sensitivity*: Recognizes and penalizes incorrect casing in sentences.
- *Broad Applicability*: Can be used on a wide range of sentences.
**Example**:
1. Dogs are mammals.
2. she loves to read books on history.
3. When the rain in Spain.
4. Eating apples are healthy for you.
5. The Eiffel Tower is in Paris.
Among these sentences:
Sentences 1 and 5 are well-formed and have correct grammar and case.
Sentence 2 starts with a lowercase letter.
Sentence 3 is a fragment and is not well-formed.
Sentence 4 has a subject-verb agreement error.
**example_usage:**
*library: HuggingFace transformers*
```python
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Ashishkr/query_wellformedness_score")
model = AutoModelForSequenceClassification.from_pretrained("Ashishkr/query_wellformedness_score")
sentences = [
"The quarterly financial report are showing an increase.", # Incorrect
"Him has completed the audit for last fiscal year.", # Incorrect
"Please to inform the board about the recent developments.", # Incorrect
"The team successfully achieved all its targets for the last quarter.", # Correct
"Our company is exploring new ventures in the European market." # Correct
]
features = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
model.eval()
with torch.no_grad():
scores = model(**features).logits
print(scores)
```
Cite Ashishkr/query_wellformedness_score
|