haBERT Model
This is the haBERT model fine-tuned for sequence classification tasks.
Context: Normative vs. Non-Normative Uses of "Haber"
The haBERT model classifies instances of "haber" into categories based on their normative and non-normative uses in Spanish.
Normative Use of "Haber" (standard-sing, standard-plur)
These are instances where the use of "haber" follows the normative grammar rules of Spanish. According to standard Spanish grammar, "haber" in existential constructions should always be in the singular form, regardless of the plurality of the subject. For example, "hay libros en la mesa".
Non-Normative Use of "Haber"
These are instances where "haber" is pluralized in existential constructions, which is non-normative in Spanish. Examples include "habían libros en la mesa" instead of "había libros en la mesa".
No Class (no_class)
Instances where "haber" does not fit into the above categories.
Performance Metrics
Per-Label Metrics
Label | Precision | Recall | F1 Score | Accuracy |
---|---|---|---|---|
standard-sing | 0.98 | 0.99 | 0.99 | 0.98 |
standard-plur | 0.98 | 0.97 | 0.97 | 0.98 |
non-standard-plur | 0.95 | 0.96 | 0.96 | 0.99 |
no_class | 0.94 | 0.85 | 0.89 | 0.99 |
Overall Metrics
Metric | Value |
---|---|
Precision | 0.96 |
Recall | 0.94 |
F1 Score | 0.95 |
Accuracy | 0.98 |
Usage
To use this model, you can load it with the transformers
library:
from transformers import BertTokenizer, BertForSequenceClassification
model_name = "johnatanebonilla/haBERT"
tokenizer = BertTokenizer.from_pretrained(model_name)
model = BertForSequenceClassification.from_pretrained(model_name)
# Example usage
inputs = tokenizer("your text here", return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits
License
This model is licensed under the MIT License.
Author
Johnatan E. Bonilla
Contact
For any inquiries or issues, please contact: johnatanebonilla@gmail.com
- Downloads last month
- 12