{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/a-simple-yet-effective-training-free-prompt","title":"A Simple yet Effective Training-free Prompt-free Approach to Chinese Spelling Correction Based on Large Language Models","arxiv_id":"2410.04027","date":"2024-10-05","proceeding":null,"authors":["Houquan Zhou","Zhenghua Li","Bo Zhang","Chen Li","Shaopeng Lai","Ji Zhang","Fei Huang","Min Zhang"],"abstract":"This work proposes a simple training-free prompt-free approach to leverage large language models (LLMs) for the Chinese spelling correction (CSC) task, which is totally different from all previous CSC approaches. The key idea is to use an LLM as a pure language model in a conventional manner. The LLM goes through the input sentence from the beginning, and at each inference step, produces a distribution over its vocabulary for deciding the next token, given a partial sentence. To ensure that the output sentence remains faithful to the input sentence, we design a minimal distortion model that utilizes pronunciation or shape similarities between the original and replaced characters. Furthermore, we propose two useful reward strategies to address practical challenges specific to the CSC task. Experiments on five public datasets demonstrate that our approach significantly improves LLM performance, enabling them to compete with state-of-the-art domain-general CSC models.","url_abs":"https://arxiv.org/abs/2410.04027v1","url_pdf":"https://arxiv.org/pdf/2410.04027v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"a-simple-yet-effective-training-free-prompt","repo_url":"https://github.com/Jacob-Zhou/simple-csc","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"spelling-correction","task_name":"Spelling Correction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2410.04027","atlas_url":"https://app.syntology.ai/?focus=2410.04027","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.04027"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/mozillazg/python-pinyin","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/gingasan/lemon","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/mozillazg/pypinyin-dict","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":4,"ran":1,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"5fdd12a2133be42f","entry":"remove_dup_items","repo":"mozillazg/python-pinyin","repo_kind":"found_in_text","path":"gen_phrases_dict.py","file_url":"https://github.com/mozillazg/python-pinyin/blob/HEAD/gen_phrases_dict.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5fdd12a2133be42f"}},{"code_sha256_prefix":"72d91cedf67b4f34","entry":"AutoCSCReLM","repo":"gingasan/lemon","repo_kind":"found_in_text","path":"autocsc.py","file_url":"https://github.com/gingasan/lemon/blob/HEAD/autocsc.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"72d91cedf67b4f34"}},{"code_sha256_prefix":"03697a2418a4c9f6","entry":"get_pinyins_via_pinyin_dict","repo":"mozillazg/python-pinyin","repo_kind":"found_in_text","path":"tidy_phrases_dict.py","file_url":"https://github.com/mozillazg/python-pinyin/blob/HEAD/tidy_phrases_dict.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03697a2418a4c9f6"}},{"code_sha256_prefix":"d95e439c609fdab6","entry":"parse","repo":"mozillazg/python-pinyin","repo_kind":"found_in_text","path":"gen_phrases_dict.py","file_url":"https://github.com/mozillazg/python-pinyin/blob/HEAD/gen_phrases_dict.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d95e439c609fdab6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}