Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix the code example with adding pipe for newer versions of spacy
  • Loading branch information
milana-94888u authored Jul 17, 2024
commit 228f237128125cb046e22bde7e1e3a7f81f9cd7c
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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]