bert_for_corrector icon indicating copy to clipboard operation
bert_for_corrector copied to clipboard

基于bert进行中文文本纠错

Results 20 bert_for_corrector issues
Sort by recently updated
recently updated
newest added

总是会报这个错误 ValueError: Could not load model ./data/bert_models/chinese_finetuned_lm/pytorch_model.bin with any of the following classes: (,). 请问您知道是什么原因吗

![image](https://user-images.githubusercontent.com/51044755/145051480-2eacf94d-5acb-44f7-930e-c7ad30510ba7.png) 你好,我将语法纠错模型训练的数据集定义成了这个样子,一行为一个样本,前面为包含语法错误的句子,后面为纠正后的句子,将这个数据集进行训练,但是,在训练过程中输出了如下信息: ![image](https://user-images.githubusercontent.com/51044755/145051981-bb5dbab9-3a4c-4387-ba04-6ffd788b3041.png) 貌似并没有将包含语法错误的句子和纠正后的句子分开,而是将句子对当作一个很长的句子,因为我理解的模型微调是在特定任务的数据集上进行训练,是有监督的数据,在模型训练过程中,包含语法错误的句子作为输入,纠正后的句子作为模型的输出, 但是您的代码貌似是通过无监督的数据进行训练,在训练过程中通过对无监督数据集进行词遮盖(mask),好像应该定义为进一步预训练,不知道我理解的是否正确 您训练过程中使用的数据集是语法错误纠正任务上的有监督的数据集还是通过无监督数据集进行进一步预训练的,期待您的回复。

def get_random_line(self): """ Get random line from another document for nextSentence task. :return: str, content of one line """ # Similar to original tf repo: This outer loop should rarely...

你好,我试着跑了一下bert_corrector.py代码,发现文件编码的错误,具体如下: Traceback (most recent call last): File "D:/soft/bert_for_corrector/bert_corrector.py", line 73, in d = BertCorrector() File "D:/soft/bert_for_corrector/bert_corrector.py", line 23, in __init__ tokenizer=bert_model_dir) File "D:\Anaconda3\Lib\site-packages\transformers\pipelines.py", line 2727, in pipeline framework = framework...

请问训练模型的数据格式是是什么样?能举个简单例子吗?

您这个代码运行速度好像有点慢呀,我在用长文本进行测试的时候

模型和开源的有什么不一样么

发现run_lm_finetuning.py和requirements.txt,不符。 期待并感谢你的回复