davmel/ka_homonym_disambiguation
Viewer • Updated • 7.52k • 52
How to use davmel/ka_homonym_disambiguation_TC with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="davmel/ka_homonym_disambiguation_TC") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("davmel/ka_homonym_disambiguation_TC")
model = AutoModelForSequenceClassification.from_pretrained("davmel/ka_homonym_disambiguation_TC", device_map="auto")This transformer model is fine-tuned to understand by the context of the sentence the definition of the homonym "ბარი" (Transl: "Bari")
It is a simple Transformer model fine-tuned on a dataset comprising 4800 hand-classified sentences.
It shows 95% accuracy on a test set comprising 1200 hand-classified sentences.
The original 6000 sentences were split into 80% training data and 20% testing data. link to dataset
The model identifies 3 definitions: label_0 - "Shovel", label_1 - "Lowland", label_2 - "Cafe-Restaurant."
My fine-tuned transformer model is based on a pre-trained transformer model which was downloaded from: https://huggingface.co/Davit6174/georgian-distilbert-mlm