Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French (doc add) #83

Open
EtienneAb3d opened this issue Aug 24, 2022 · 4 comments
Open

French (doc add) #83

EtienneAb3d opened this issue Aug 24, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@EtienneAb3d
Copy link

EtienneAb3d commented Aug 24, 2022

As requested in #41, here is how I succeeded in running contextualSpellCheck for French.

Use French spaCy model:

nlp = spacy.load("fr_core_news_sm")

Use camembert/camembert-base-ccnet:

nlp.add_pipe("contextual spellchecker", config={"max_edit_dist": 4,"model_name": "camembert/camembert-base-ccnet"})

Need these dependencies:

pip install sentencepiece
pip install protobuf==3.20

Remark: on the result spaces are lost, thus need a post-processing to get them back properly.

PS: for flaubert/flaubert_large_cased model, need this dependency

pip install sacremoses
@EtienneAb3d EtienneAb3d added the enhancement New feature or request label Aug 24, 2022
@R1j1t R1j1t added the documentation Improvements or additions to documentation label Aug 25, 2022
@R1j1t
Copy link
Owner

R1j1t commented Aug 25, 2022

Hey, @EtienneAb3d thank you for raising this request. It is excellent to know you were successfully able to use it for french!

Would you like to raise a PR to add an example for the french language similar to other examples? I would be happy to merge the PR as it would be a great addition for people using it for french!

If you have any suggestions or other feedback, feel free to highlight them.

@EtienneAb3d
Copy link
Author

Hi @R1j1t, perhaps later I will find the time to build such a PR. But, on the team side, if you have a direct access to edit, it's only few lines to add to the doc.
;-)

@R1j1t
Copy link
Owner

R1j1t commented Aug 26, 2022

No worries!

@mtx-z
Copy link

mtx-z commented Apr 30, 2024

Also note that in addition to @EtienneAb3d steps, in a Jupyer Notebook: restart kernel after protobuf install

!pip uninstall -y protobuf
!pip install protobuf==3.20

Also @EtienneAb3d , how did you manage the lost spaces issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants