├── .gitignore ├── README.md ├── config ├── bert_phonics_dictionary_strokes.yaml ├── default.yaml ├── hybrid.yaml ├── test13.yaml ├── test14.yaml └── test15.yaml ├── main.py ├── metric ├── BasicMetric.py ├── CharCorrectPRFMetric.py ├── CharDetectPRFMetric.py ├── PRFMetric.py ├── SentCorrectPRFMetric.py └── SentDetectPRFMetric.py ├── model ├── CrossEntropyLossWithMask.py ├── GlyphClassifier.py ├── GlyphEncoder.py ├── InfoNCELossForCSC.py ├── SpellBERT.py ├── WordClassifier.py └── modeling_bert.py ├── pipeline ├── BasicPipeline.py ├── HybridPipeline.py ├── MultiModelPipeline.py └── MultiTaskPipeline.py ├── processor ├── BasicProcessor.py ├── HybridProcessor.py ├── MultiSourceProcessor.py ├── PinyinConvertor.py └── ReorderProcessor.py ├── reader ├── BasicDataset.py ├── BasicReader.py ├── ConfusionExpandedReader.py ├── HybridReader.py └── WordDictReader.py ├── resources ├── confusion.txt └── dictionary_word.json ├── run.sh ├── test.sh └── utils ├── __pycache__ ├── _global.cpython-39.pyc └── config_parser.cpython-39.pyc ├── _global.py └── config_parser.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/README.md -------------------------------------------------------------------------------- /config/bert_phonics_dictionary_strokes.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/config/bert_phonics_dictionary_strokes.yaml -------------------------------------------------------------------------------- /config/default.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/config/default.yaml -------------------------------------------------------------------------------- /config/hybrid.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/config/hybrid.yaml -------------------------------------------------------------------------------- /config/test13.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/config/test13.yaml -------------------------------------------------------------------------------- /config/test14.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/config/test14.yaml -------------------------------------------------------------------------------- /config/test15.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/config/test15.yaml -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/main.py -------------------------------------------------------------------------------- /metric/BasicMetric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/metric/BasicMetric.py -------------------------------------------------------------------------------- /metric/CharCorrectPRFMetric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/metric/CharCorrectPRFMetric.py -------------------------------------------------------------------------------- /metric/CharDetectPRFMetric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/metric/CharDetectPRFMetric.py -------------------------------------------------------------------------------- /metric/PRFMetric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/metric/PRFMetric.py -------------------------------------------------------------------------------- /metric/SentCorrectPRFMetric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/metric/SentCorrectPRFMetric.py -------------------------------------------------------------------------------- /metric/SentDetectPRFMetric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/metric/SentDetectPRFMetric.py -------------------------------------------------------------------------------- /model/CrossEntropyLossWithMask.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/model/CrossEntropyLossWithMask.py -------------------------------------------------------------------------------- /model/GlyphClassifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/model/GlyphClassifier.py -------------------------------------------------------------------------------- /model/GlyphEncoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/model/GlyphEncoder.py -------------------------------------------------------------------------------- /model/InfoNCELossForCSC.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/model/InfoNCELossForCSC.py -------------------------------------------------------------------------------- /model/SpellBERT.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/model/SpellBERT.py -------------------------------------------------------------------------------- /model/WordClassifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/model/WordClassifier.py -------------------------------------------------------------------------------- /model/modeling_bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/model/modeling_bert.py -------------------------------------------------------------------------------- /pipeline/BasicPipeline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/pipeline/BasicPipeline.py -------------------------------------------------------------------------------- /pipeline/HybridPipeline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/pipeline/HybridPipeline.py -------------------------------------------------------------------------------- /pipeline/MultiModelPipeline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/pipeline/MultiModelPipeline.py -------------------------------------------------------------------------------- /pipeline/MultiTaskPipeline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/pipeline/MultiTaskPipeline.py -------------------------------------------------------------------------------- /processor/BasicProcessor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/processor/BasicProcessor.py -------------------------------------------------------------------------------- /processor/HybridProcessor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/processor/HybridProcessor.py -------------------------------------------------------------------------------- /processor/MultiSourceProcessor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/processor/MultiSourceProcessor.py -------------------------------------------------------------------------------- /processor/PinyinConvertor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/processor/PinyinConvertor.py -------------------------------------------------------------------------------- /processor/ReorderProcessor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/processor/ReorderProcessor.py -------------------------------------------------------------------------------- /reader/BasicDataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/reader/BasicDataset.py -------------------------------------------------------------------------------- /reader/BasicReader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/reader/BasicReader.py -------------------------------------------------------------------------------- /reader/ConfusionExpandedReader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/reader/ConfusionExpandedReader.py -------------------------------------------------------------------------------- /reader/HybridReader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/reader/HybridReader.py -------------------------------------------------------------------------------- /reader/WordDictReader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/reader/WordDictReader.py -------------------------------------------------------------------------------- /resources/confusion.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/resources/confusion.txt -------------------------------------------------------------------------------- /resources/dictionary_word.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/resources/dictionary_word.json -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/run.sh -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/test.sh -------------------------------------------------------------------------------- /utils/__pycache__/_global.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/utils/__pycache__/_global.cpython-39.pyc -------------------------------------------------------------------------------- /utils/__pycache__/config_parser.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/utils/__pycache__/config_parser.cpython-39.pyc -------------------------------------------------------------------------------- /utils/_global.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/utils/_global.py -------------------------------------------------------------------------------- /utils/config_parser.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekjuruo/LEAD/HEAD/utils/config_parser.py --------------------------------------------------------------------------------