arXiv:2609.04262cs.SDSep 2026

Manuscript Offprint

arXiv:2609.04262

Low-Latency Spell Correction for Japanese Music Search Queries

Anshul Garg, Pavni Tandon, Karan Bhukar, Tanmay Khandelwal, Ujjal Kumar Dutta

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Spell correction for Japanese search queries presents unique challenges due to the co-existence of four writing scripts (Latin/romaji, hiragana, katakana, and kanji) and the distinct error patterns each script induces. We present a compact BART-based sequence-to-sequence model (3 encoder + 3 decoder layers) designed for low-latency spell correction of Japanese music search queries. The core contribution lies in a script-aware synthetic misspelling generation pipeline that produces realistic training data by combining keyboard-layout models (QWERTY and flick input), phonetic confusion priors mined from real query logs, voiced/unvoiced consonant alternations, and kana case errors. A key design decision is normalizing mixed-script catalog titles to a single canonical script before misspelling synthesis, which we show is critical for reducing model hallucinations. We train a custom byte-level BPE tokenizer on the target music catalog to handle all four scripts in a unified vocabulary. Experiments on a curated evaluation set show that our model achieves an exact-match accuracy of 41.09% and a character error rate (CER) of 11.62%, outperforming edit-distance baselines and achieving the lowest character error rate among all evaluated systems while maintaining sub-4ms inference latency on a single GPU. We further analyze performance across individual scripts and mixed-script queries, demonstrating the effectiveness of script-aware data augmentation through systematic ablation studies.

1 Introduction

Search query spell correction is a critical component of modern information retrieval systems, directly impacting user experience and downstream retrieval quality. While spell correction for English and other Latin-script languages has been extensively studied [1, 2], Japanese poses a fundamentally different challenge: users may type queries in any of four writing scripts (hiragana, katakana, kanji, and Latin/romaji) or in arbitrary combinations thereof. Each script introduces its own characteristic error patterns. For instance, hiragana and katakana input via flick keyboards on mobile devices produces adjacency errors that differ entirely from QWERTY typos in romaji, while kanji input errors often stem from homophone confusion during input method editor (IME) conversion.

In the domain of music search, these challenges are amplified. Music entity names frequently contain mixed-script text (e.g., an artist name in katakana followed by a song title in kanji with romaji loanwords), and users often search using a different script than the canonical catalog entry. A robust spell correction system must therefore handle all four scripts and their combinations within a single model while meeting strict latency requirements for real-time search.

We address this problem with three contributions:

Preprint. Under review.

  1. Script-aware synthetic data generation. We design a misspelling synthesis pipeline that models error distributions specific to each Japanese script, including flick keyboard adjacency errors for kana, QWERTY typos for romaji, voiced/unvoiced consonant confusion (ḥʰ ↔ ḥʰ), small/large kana alternation (↔ ↔ ㄱ), and contextual phonetic priors mined from real query-entity correction logs.

  2. Script normalization for training data. We show that normalizing mixed-script catalog titles to a single canonical script before generating synthetic misspellings is critical for reducing model hallucinations on mixed-script inputs. Our search index stores entity titles in pure script (single writing system per title), and aligning the training data generation with this constraint significantly improves correction quality.

  3. A compact seq2seq architecture. We train a 6-layer BART model (3 encoder + 3 decoder layers) with a custom byte-level BPE tokenizer built on the music catalog vocabulary, enabling unified handling of all scripts with sub-4ms inference latency. We demonstrate that data quality compensates for model size, achieving near-LLM correction quality at two orders of magnitude lower latency.