Download Latest Version 1.1.2 source code.tar.gz (11.5 MB)
Email in envelope

Get an email when there's a new version of Pycorrector

Home / 1.1.2
Name Modified Size InfoDownloads / Week
Parent folder
1.1.2 source code.tar.gz 2025-07-08 11.5 MB
1.1.2 source code.zip 2025-07-08 11.6 MB
README.md 2025-07-08 1.3 kB
Totals: 3 Items   23.1 MB 0

v1.1.2

import sys

sys.path.append("../..")
from pycorrector.gpt.gpt_corrector import GptCorrector

if __name__ == '__main__':
    error_sentences = [
        '少先队员因该为老人让坐',
        '真麻烦你了。希望你们好好的跳无',
        '机七学习是人工智能领遇最能体现智能的一个分知',
        '一只小鱼船浮在平净的河面上',
        '我的家乡是有明的渔米之乡',
        '目击者称,以军已把封锁路障除去,不过备关卡检查站仍有坦克派驻,车辆已能来往通过,只是流量很漫。',
        '行政相对人对行政机关作出的行政处罚决定不服,不能申请行政服役的是何种行政行为?',
        '“明德慎罚”是殷商初期“天命”、“天罚”思想的继承和发扬',
    ]

    m = GptCorrector("twnlp/ChineseErrorCorrector3-4B")
    batch_res = m.correct_batch(error_sentences,
                                prefix_prompt='你是一个文本纠错专家,纠正输入句子中的语法错误,并输出正确的句子,输入句子为:')
    for i in batch_res:
        print(i)
        print()

Full Changelog: https://github.com/shibing624/pycorrector/compare/1.1.1...1.1.2

Source: README.md, updated 2025-07-08