Downloads · 30 days
11
12% of all-time downloads
seyfullah2/turkish-stemmer-t5-small
turkish-stemmer-t5-small is a text generation model from seyfullah2. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
mT5-small fine-tuned for Turkish stemming
Downloads · 30 days
11
12% of all-time downloads
All-time downloads
90
Public
Parameters
300M
1.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.2 GB · 100%
From the Hugging Face model README
mT5-small fine-tuned for Turkish stemming
Bu model, Türkçe kelimelerin köklerini (stem) bulmak için fine-tune edilmiş bir seq2seq modelidir. Türkçe morfolojik analiz görevleri için optimize edilmiştir.
pip install transformers torch
from transformers import T5Tokenizer, T5ForConditionalGeneration
# Model ve tokenizer yükleme
model_name = "seyfullah2/turkish-stemmer-t5"
tokenizer = T5Tokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
# Kök bulma fonksiyonu
def find_stem(word):
input_text = f"kök bul: {word}"
inputs = tokenizer(input_text, return_tensors="pt", max_length=64, truncation=True)
outputs = model.generate(
**inputs,
max_length=64,
num_beams=4,
early_stopping=True,
no_repeat_ngram_size=2
)
root = tokenizer.decode(outputs[0], skip_special_tokens=True)
return root.strip()
# Örnek kullanım
print(find_stem("kitaplardan")) # → kitap
print(find_stem("evlerimizde")) # → ev
print(find_stem("koşuyordum")) # → koş
words = ["kitaplar", "evlerde", "geliyorum", "başladı"]
for word in words:
stem = find_stem(word)
print(f"{word} → {stem}")
| Metrik | Değer |
|---|---|
| Accuracy | 92.00% |
| Test Samples | 5,500 |
| Avg Inference Time | ~50ms per word |
Model şu hiperparametrelerle eğitildi:
Model, kelime-kök eşleşmeleri içeren özel bir Türkçe veri setiyle eğitildi:
MIT License
Sorular için: GitHub Issues
@misc{turkish-stemmer-2025,
author = {seyfullah2},
title = {Turkish Stemmer T5},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/seyfullah2/turkish-stemmer-t5}}
}