Universe

Contextual Spell Check

Contextual spell correction using BERT (bidirectional representations)

This package currently focuses on Out of Vocabulary (OOV) word or non-word error (NWE) correction using BERT model. The idea of using BERT was to use the context when correcting NWE. In the coming days, I would like to focus on RWE and optimising the package by implementing it in cython.

Example

import spacy import contextualSpellCheck nlp = spacy.load('en') contextualSpellCheck.add_to_pipe(nlp) doc = nlp('Income was $9.4 milion compared to the prior year of $2.7 milion.') print(doc._.performed_spellCheck) #Should be True print(doc._.outcome_spellCheck) #Income was $9.4 million compared to the prior year of $2.7 million.

View more
Author info

Rajat Goel

GitHubR1j1t/contextualSpellCheck

Categories pipeline conversational research

Submit your project

If you have a project that you want the spaCy community to make use of, you can suggest it by submitting a pull request to the spaCy website repository. The Universe database is open-source and collected in a simple JSON file. For more details on the formats and available fields, see the documentation. Looking for inspiration your own spaCy plugin or extension? Check out the project idea label on the issue tracker.

Read the docsJSON source