shibing624 / pycorrector

pycorrector is a toolkit for text error correction. 文本纠错,实现了Kenlm,T5,MacBERT,ChatGLM3,Qwen2.5等模型应用在纠错场景,开箱即用。
https://www.mulanai.com/product/corrector/
Apache License 2.0
5.57k stars 1.1k forks source link

ValueError: too many values to unpack (expected 2) #459

Closed KrisTopherHao closed 9 months ago

KrisTopherHao commented 10 months ago

Describe the Question

Please provide a clear and concise description of what the question is. Traceback (most recent call last): File "pycorrector_klm.py", line 8, in corrected_sent, detail = model.correct('少先队员因该为老人让坐') ValueError: too many values to unpack (expected 2)

shibing624 commented 10 months ago

看下readme:

from pycorrector import Corrector
m = Corrector()
print(m.correct_batch(['少先队员因该为老人让坐', '你找到你最喜欢的工作,我也很高心。']))