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

Language Support (rather than English)? #6

Open
Anwarvic opened this issue Nov 7, 2019 · 1 comment
Open

Language Support (rather than English)? #6

Anwarvic opened this issue Nov 7, 2019 · 1 comment

Comments

@Anwarvic
Copy link

Anwarvic commented Nov 7, 2019

As I can see, spacy_hunspell supports English perfectly... what about other languages like Arabic, French, ... etc.?

@ju-resplande
Copy link

@Anwarvic, the module seems to support other languages too...

InspaCyHunSpell(nlp, ('en_US.dic', 'en_US.aff')) andspacy.load('en_core_web_sm') change to your language dictionary and Spacy language model.

I did it for Portuguese.

from spacy.lang.pt import Portuguese
from spacy_hunspell import spaCyHunSpell

nlp = Portuguese()
hunspell_dicts = ('/usr/share/hunspell/pt_BR.dic', '/usr/share/hunspell/pt_BR.aff')
hunspell = spaCyHunSpell(nlp, hunspell_dicts)
nlp.add_pipe(hunspell)

where I've installed hunspell-pt-br and Portuguese spacy models

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants