71f13f9f34e573f9beae783d30c003452af0771a,examples/use_custom_confusion.py,,,#,9

Before Change


    print("*" * 53)
    pycorrector.set_custom_confusion_dict(path="./my_custom_confusion.txt")
    for line in error_sentences:
        correct_sent = pycorrector.correct(line)
        print("original sentence:{} => correct sentence:{}".format(line, correct_sent))

// original sentence:买iPhone差,要多少钱 => correct sentence:("买iPhone差,要多少钱", [])
// original sentence:我想喝小明同学。 => correct sentence:("我想喝小明同学。", [])

After Change


    print("*" * 53)
    pycorrector.set_custom_confusion_dict(path="./my_custom_confusion.txt")
    for line in error_sentences:
        print(pycorrector.correct(line))

// ("买iPhone差,要多少钱", [])
// ("我想喝小明同学。", [])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: shibing624/pycorrector
Commit Name: 71f13f9f34e573f9beae783d30c003452af0771a
Time: 2020-03-13
Author: xuming624@qq.com
File Name: examples/use_custom_confusion.py
Class Name:
Method Name:


Project Name: shibing624/pycorrector
Commit Name: 2aab0aa99a0511f1d4d8011a54e750541337ce69
Time: 2019-11-25
Author: xuming624@qq.com
File Name: tests/error_correct_test.py
Class Name:
Method Name:


Project Name: shibing624/pycorrector
Commit Name: 64bda1987a12712c69d488b040c668e5907129fb
Time: 2020-02-26
Author: xuming624@qq.com
File Name: examples/load_custom_language_model.py
Class Name:
Method Name: