Great project.
The main friction for new users is the cold-start: learn_from() requires labelled (ocr_string, ground_truth) pairs that most people don't have.
Would it be possible to ship a precomputed substitution_costs JSON trained on a public OCR dataset (e.g. OCR-D, Tesseract UNLV)? Something like:
from ocr_stringdist import WeightedLevenshtein, PRETRAINED_COSTS
wl = WeightedLevenshtein(substitution_costs=PRETRAINED_COSTS)
OR
from ocr_stringdist import WeightedLevenshtein
wl = WeightedLevenshtein() # it used default pretrained costs
Since the model is just a dict[tuple[str, str], float], it'd be trivial to bundle as a JSON file or release asset.
Even a training script + dataset pointer would help.
Great project.
The main friction for new users is the cold-start: learn_from() requires labelled (ocr_string, ground_truth) pairs that most people don't have.
Would it be possible to ship a precomputed substitution_costs JSON trained on a public OCR dataset (e.g. OCR-D, Tesseract UNLV)? Something like:
OR
Since the model is just a dict[tuple[str, str], float], it'd be trivial to bundle as a JSON file or release asset.
Even a training script + dataset pointer would help.