{"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/c-llm-learn-to-check-chinese-spelling-errors","title":"C-LLM: Learn to Check Chinese Spelling Errors Character by Character","arxiv_id":"2406.16536","date":"2024-06-24","proceeding":null,"authors":["Kunting Li","Yong Hu","Liang He","Fandong Meng","Jie zhou"],"abstract":"Chinese Spell Checking (CSC) aims to detect and correct spelling errors in sentences. Despite Large Language Models (LLMs) exhibit robust capabilities and are widely applied in various tasks, their performance on CSC is often unsatisfactory. We find that LLMs fail to meet the Chinese character-level constraints of the CSC task, namely equal length and phonetic similarity, leading to a performance bottleneck. Further analysis reveal that this issue stems from the granularity of tokenization, as current mixed character-word tokenization struggles to satisfy these character-level constraints. To address this issue, we propose C-LLM, a Large Language Model-based Chinese Spell Checking method that learns to check errors Character by Character. Character-level tokenization enables the model to learn character-level alignment, effectively mitigating issues related to character-level constraints. Furthermore, CSC is simplified to replication-dominated and substitution-supplemented tasks. Experiments on two CSC benchmarks demonstrate that C-LLM achieves an average improvement of 10% over existing methods. Specifically, it shows a 2.1% improvement in general scenarios and a significant 12% improvement in vertical domain scenarios, establishing state-of-the-art performance. The source code can be accessed at https://github.com/ktlKTL/C-LLM.","url_abs":"https://arxiv.org/abs/2406.16536v2","url_pdf":"https://arxiv.org/pdf/2406.16536v2.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":"c-llm-learn-to-check-chinese-spelling-errors","repo_url":"https://github.com/ktlktl/c-llm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"chinese-spell-checking","task_name":"Chinese Spell Checking"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2406.16536","atlas_url":"https://app.syntology.ai/?focus=2406.16536","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.16536"}},"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/ktlKTL/C-LLM","reach":{"status":"ok"}}],"summary":{"ran":5,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"repositories":1}},"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":6,"samples":[{"code_sha256_prefix":"2ad6711456139fd1","entry":"calculate_metric","repo":"ktlKTL/C-LLM","repo_kind":"official","path":"calcuate_metric.py","file_url":"https://github.com/ktlKTL/C-LLM/blob/HEAD/calcuate_metric.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2ad6711456139fd1"}},{"code_sha256_prefix":"105d9db50d86644e","entry":"get_path","repo":"ktlKTL/C-LLM","repo_kind":"official","path":"evaluate_result.py","file_url":"https://github.com/ktlKTL/C-LLM/blob/HEAD/evaluate_result.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"105d9db50d86644e"}},{"code_sha256_prefix":"11e651b2e2ff9203","entry":"input_process","repo":"ktlKTL/C-LLM","repo_kind":"official","path":"calcuate_metric.py","file_url":"https://github.com/ktlKTL/C-LLM/blob/HEAD/calcuate_metric.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"11e651b2e2ff9203"}},{"code_sha256_prefix":"eb0a4d4f61101c5a","entry":"prepare_model_for_training","repo":"ktlKTL/C-LLM","repo_kind":"official","path":"llm_train_util.py","file_url":"https://github.com/ktlKTL/C-LLM/blob/HEAD/llm_train_util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eb0a4d4f61101c5a"}},{"code_sha256_prefix":"d42c25d32a24dae3","entry":"str_full_to_half","repo":"ktlKTL/C-LLM","repo_kind":"official","path":"calcuate_metric.py","file_url":"https://github.com/ktlKTL/C-LLM/blob/HEAD/calcuate_metric.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d42c25d32a24dae3"}},{"code_sha256_prefix":"4375c770592c06a6","entry":"create_and_prepare_dataset","repo":"ktlKTL/C-LLM","repo_kind":"official","path":"train_new.py","file_url":"https://github.com/ktlKTL/C-LLM/blob/HEAD/train_new.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":"4375c770592c06a6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}