jiahaozhenbang / scope Goto Github PK
View Code? Open in Web Editor NEWSource code for the paper "Improving Chinese Spelling Check by Character Pronunciation Prediction: The Effects of Adaptivity and Granularity" in EMNLP 2022
Source code for the paper "Improving Chinese Spelling Check by Character Pronunciation Prediction: The Effects of Adaptivity and Granularity" in EMNLP 2022
Thanks for your great work!
Could you please provide the parallel csc data which generate by using confusion set and wiki2019zh ? ❤
The following error occurred when I used 2 GeForce RTX 3090 with 24G memory on the server. Please kindly answer it.
Traceback (most recent call last):
File "/root/autodl-tmp/SCOPE/finetune/train.py", line 433, in
main()
File "/root/autodl-tmp/SCOPE/finetune/train.py", line 426, in main
trainer.fit(model)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 735, in fit
self._call_and_handle_interrupt(
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 682, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 770, in _fit_impl
self._run(model, ckpt_path=ckpt_path)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1193, in _run
self._dispatch()
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1272, in _dispatch
self.training_type_plugin.start_training(self)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/ddp_spawn.py", line 173, in start_training
self.spawn(self.new_process, trainer, self.mp_queue, return_result=False)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/ddp_spawn.py", line 201, in spawn
mp.spawn(self._wrapped_function, args=(function, args, kwargs, return_queue), nprocs=self.num_processes)
File "/root/miniconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 239, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/root/miniconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes
process.start()
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/root/miniconda3/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/root/miniconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/root/miniconda3/lib/python3.8/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/root/miniconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/root/miniconda3/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'get_linear_schedule_with_warmup..lr_lambda'
Excuse me, have you provide the code for the pre-training section?
Hello, excuse me, I want to know how you use two cpus for training, I wonder if it is convenient for you to tell me, looking forward to your reply! Thanks!
Thanks for your great work!
Could you please provide the final finetuned model? ❤
I try to reproduce the result in the paper. I completely follow the environment in the README.md
file.
I have run 30 epochs by 'train.sh' script, and the final checkpoints are the following:
epoch=23-df=79.3537-cf=78.0969.ckpt
epoch=25-df=80.1070-cf=78.1445.ckpt
epoch=26-df=80.1810-cf=78.5520.ckpt
epoch=28-df=80.1802-cf=78.7387.ckpt
epoch=29-df=80.2158-cf=78.5971.ckpt
I used the final checkpoint to evaluate the model by sighan 2015 and I got the results is following:
# without CIC
'sent-detect-acc': 85.36363636363636, 'sent-detect-p': 78.10858143607706, 'sent-detect-r': 82.43992606284658, 'sent-detect-f1': 80.21582733812951, 'sent-correct-acc': 84.54545454545455, 'sent-correct-p': 76.5323992994746, 'sent-correct-r': 80.77634011090574, 'sent-correct-f1': 78.59712230215827, 'char-detect-f1': 86.45614035087719, 'char-correct-f1': 91.12964366944655
# with CIC
{'sent-detect-acc': 86.27272727272727, 'sent-detect-p': 79.75133214920072, 'sent-detect-r': 82.99445471349352, 'sent-detect-f1': 81.34057971014492, 'sent-correct-acc': 85.45454545454545, 'sent-correct-p': 78.15275310834814, 'sent-correct-r': 81.33086876155268, 'sent-correct-f1': 79.71014492753623, 'char-detect-f1': 87.1578947368421, 'char-correct-f1': 91.38972809667673}
The sentence-level correction results of the without CIC
is the same as the Ablation Study. But the other results are totally different compared to the results in the paper.
I want to know what I did wrong and how to get the results in the paper. Looking forward to your reply.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.