R1j1t / contextualSpellCheck

✔️Contextual word checker for better suggestions
MIT License
409 stars 66 forks source link

How to specify bert model? #15

Closed wushixian closed 4 years ago

wushixian commented 4 years ago

I use spacy 2.3.1 which support chinese model, and I wanna use contextualspellcheck to check chinese spell,but the result is hard to understand, so I think I should specify a chinese bert model. Can I specify it by code? or I must modify source code to do that? thanks very much.

R1j1t commented 4 years ago

At present, you will have to modify the source code. I have this use case in mind and because we use transformers package it should be relatively easy. If you think you can contribute, please raise a PR for it! I would be happy to see new contributions.

wushixian commented 4 years ago

OK,I really wanna try it. Thanks very much.

wushixian commented 4 years ago

I tried ro modify the code, and used bert-base-chinese model, but the result was not ideal, I'll try to fine-tuning the model.

R1j1t commented 4 years ago

@wushixian did you consider the edit distance logic? I dont think it will be same as english. Maybe you need to modify this function.

wushixian commented 4 years ago

Thanks for the remind, I'll try to modify the function.