Journal of Electronics, Electromedical Engineering, and Medical Informatics
Vol 8 No 4 (2026): October

A Graph-Assisted Post-OCR Framework with Damerau-Levenshtein Spelling Correction for Drug Name Recognition from Pharmaceutical Packaging

Fito Satrio (Data Science Study Program, Telkom University, Purwokerto, Indonesia)
Muhammad Raafi'u Firmansyah (Informatics Engineering Study Program, Telkom University, Purwokerto Campus, Indonesia)
Diah Septiani (Data Science Study Program, Telkom University, Purwokerto, Indonesia)



Article Info

Publish Date
31 Oct 2026

Abstract

Medication errors remain a persistent threat to patient safety, with a global prevalence of approximately 3%, rising to 11% in elderly care and 7% in intensive care units. In Indonesia, the large number of BPOM-registered pharmaceutical products increases the risk of drug misidentification from look-alike, sound-alike (LASA) names. At the same time, conventional OCR pipelines remain limited by heterogeneous layouts, font variation, and brand–generic name ambiguity. This study develops an integrated, lightweight post-OCR framework resolving both character-level OCR errors and brand–generic naming ambiguity without costly large language models. The main contributions are a Damerau-Levenshtein Spelling Correction (DLSC) module correcting character-level errors against a validated drug dictionary, and a Graph Traversal Correction (GTC) mechanism modeling brand–generic relationships as a directed graph for disambiguation. The framework was evaluated on a self-collected, web-scraped dataset of 9,500 Indonesian drug packaging images spanning 3,678 brand labels, split 80:20 at the brand-label level; three pretrained OCR engines (Tesseract, EasyOCR, PaddleOCR) were benchmarked without domain-specific fine-tuning under both CPU and GPU configurations, with the training subset serving only as a consistency check rather than fitting data, since DLSC and GTC are rule-based and undergo no parameter training. PaddleOCR + DLSC + GTC achieved the best performance, raising accuracy from 50.94% (Raw OCR) to 96.13% on training and 96.69% on testing data, with WER reduced to 3.82%/3.44% and CER to 3.64%/3.76%. Paired McNemar statistical testing confirmed GTC’s improvement over DLSC is significant across all three engines, and baseline comparison confirmed this gain stems specifically from explicit transposition modeling rather than generic dictionary correction. GTC added only 0.05–0.06 ms beyond DLSC regardless of CPU or GPU configuration. Findings indicate that combining lightweight edit-distance correction with graph-based disambiguation substantially improves drug-name recognition accuracy under resource-constrained, pretrained-model deployment conditions

Copyrights © 2026






Journal Info

Abbrev

jeeemi

Publisher

Subject

Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering Engineering

Description

The Journal of Electronics, Electromedical Engineering, and Medical Informatics (JEEEMI) is a peer-reviewed open-access journal. The journal invites scientists and engineers throughout the world to exchange and disseminate theoretical and practice-oriented topics which covers three (3) majors areas ...