urdu_5gram.bin: Binary n-gram model (KenLM format)config.json: Model configuration1from pyctcdecode import build_ctcdecoder
2import json
3
4# Load vocabulary (from your processor)
5vocab = ["<pad>", "<s>", "</s>", "<unk>", "|", ...] # Your vocab here
6
7# Build decoder
8decoder = build_ctcdecoder(
9 vocab,
10 kenlm_model_path='urdu_5gram.bin',
11 alpha=0.5,
12 beta=1.5
13)