8f76475c3e5b3533b40e7ba41ca11ec987ffe974,pycorrector/detector.py,Detector,detect,#Detector#Any#,321

Before Change


        blocks = re_han.split(sentence)
        start_idx = 0
        for blk in blocks:
            if not blk:
                continue
            if re_han.match(blk):
                maybe_errors += self._detect_short(blk, start_idx)
                start_idx += len(blk)
            else:

After Change


        // 文本归一化
        text = uniform(text)
        // 长句切分为短句
        blocks = self.split_2_short_text(text)
        for blk, idx in blocks:
            maybe_errors += self.detect_short(blk, idx)
        return maybe_errors
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: shibing624/pycorrector
Commit Name: 8f76475c3e5b3533b40e7ba41ca11ec987ffe974
Time: 2020-03-15
Author: xuming624@qq.com
File Name: pycorrector/detector.py
Class Name: Detector
Method Name: detect


Project Name: shibing624/pycorrector
Commit Name: dad1abdcffb4d37256502a73a1c236aa2f07636b
Time: 2020-03-17
Author: xuming624@qq.com
File Name: pycorrector/bert/bert_corrector.py
Class Name: BertCorrector
Method Name: bert_correct


Project Name: shibing624/pycorrector
Commit Name: 8f76475c3e5b3533b40e7ba41ca11ec987ffe974
Time: 2020-03-15
Author: xuming624@qq.com
File Name: pycorrector/corrector.py
Class Name: Corrector
Method Name: correct