BERTurk (Turkish BERT, 128k uncased) fine-tuned for Turkish spelling correction on NoisyWikiTr with the NeuSpell toolkit. For each input word, the model predicts the correct word from a fixed output vocabulary, using the whole sentence as context.
Released with Leveraging Large Language Models for Spelling Correction in Turkish (Ceren Güzel Turhan, PeerJ Computer Science 11:e2889, 2025).
| File | Content |
|---|---|
pytorch_model.bin |
fine-tuned NeuSpell BertChecker weights |
vocab.pkl |
output word vocabulary built from the NoisyWikiTr training data |
This is a NeuSpell checkpoint, not a plain transformers model: load it with NeuSpell, not
AutoModel.
Install NeuSpell from the trspell repository (a fork adapted to Turkish):
pip install git+https://github.com/cgturhan/trspell
import pickle
from huggingface_hub import snapshot_download
from neuspell import BertChecker
BASE = "dbmdz/bert-base-turkish-128k-uncased"
ckpt_path = snapshot_download("cguzel/trspell-neuspell-berturk")
vocab = pickle.load(open(f"{ckpt_path}/vocab.pkl", "rb"))
checker = BertChecker(device="cpu")
checker.from_pretrained(pretrained_name_or_path=BASE, ckpt_path=ckpt_path, vocab=vocab)
print(checker.correct("netekim kasım ve temmuz felaketleri bunun sadece acı iki örneğidir"))
checker.correct() returns the corrected sentence; checker.correct_strings([...]) corrects a list of sentences.
Input should be normalised like the training data: lowercase with Turkish rules (I → ı, İ → i), no digits, punctuation or apostrophes.
dbmdz/bert-base-turkish-128k-uncased, a Turkish BERT (BERTurk) with a 128k uncased vocabularyvocab.pkl (NeuSpell BertChecker)BertChecker.finetuneResults on the NoisyWikiTr test set (uniform and realistic noise) are reported in Table 5 of the paper.
vocab.pkl; rare or unseen words may not be corrected.@article{guzelturhan2025trspell,
title = {Leveraging large language models for spelling correction in Turkish},
author = {G{\"u}zel Turhan, Ceren},
journal = {PeerJ Computer Science},
volume = {11},
pages = {e2889},
year = {2025}
}
有文件?提交种子。
发布种子