From cd70dcf2a63933cb3e827744b94297c9cfec8192 Mon Sep 17 00:00:00 2001 From: Milana Sireneva <106812391+milana-94888u@users.noreply.github.com> Date: Wed, 17 Jul 2024 20:06:26 +0200 Subject: [PATCH 1/2] Add link to non-english dictionaries --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2e2deea..5d68abc 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ hunspell = spaCyHunSpell(nlp, ('en_US.dic', 'en_US.aff')) ``` You can find the [English dictionary files here](http://wordlist.aspell.net/dicts/). +You can find the [dictionary files for other languages here](https://github.com/LibreOffice/dictionaries). ## Installation From 228f237128125cb046e22bde7e1e3a7f81f9cd7c Mon Sep 17 00:00:00 2001 From: Milana Sireneva <106812391+milana-94888u@users.noreply.github.com> Date: Wed, 17 Jul 2024 20:07:40 +0200 Subject: [PATCH 2/2] Fix the code example with adding pipe for newer versions of spacy --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d68abc..25a25fa 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,13 @@ Add the spaCyHunSpell to the spaCy pipeline. ``` import spacy +from spacy.language import Language from spacy_hunspell import spaCyHunSpell nlp = spacy.load('en_core_web_sm') hunspell = spaCyHunSpell(nlp, 'mac') -nlp.add_pipe(hunspell) +Language.component("hunspell")(hunspell) +nlp.add_pipe("hunspell") doc = nlp('I can haz cheezeburger.') haz = doc[2]