SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.04027 · EMNLP · 2024

A Simple yet Effective Training-free Prompt-free Approach to Chinese Spelling Correction Based on Large Language Models

Fei Huang, Min Zhang, Bo Zhang, Ji Zhang, Chen Li, Zhenghua Li, Shaopeng Lai, Houquan Zhou

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 1 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
mozillazg/python-pinyin canonical 1 of 3
gingasan/lemon — 0 of 1
FunctionStatusWhere it lives
remove_dup_items Ran mozillazg/python-pinyin/gen_phrases_dict.py
code served (permissive licence) · get_code("5fdd12a2133be42f")
AutoCSCReLM Not yet run gingasan/lemon/autocsc.py
pointer only (licence: NONE) · get_code("72d91cedf67b4f34")
get_pinyins_via_pinyin_dict Not yet run mozillazg/python-pinyin/tidy_phrases_dict.py
code served (permissive licence) · get_code("03697a2418a4c9f6")
parse Not yet run mozillazg/python-pinyin/gen_phrases_dict.py
code served (permissive licence) · get_code("d95e439c609fdab6")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.04027")
get_code_for_paper("2410.04027")
have("2410.04027")

Connect an agent — have() is free.