Skip to content

thmslmr/Spelling-Corrector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 

Repository files navigation

Spelling Corrector

Spelling Corrector using the frequence of use of words in a dataset of books.

Four languages are currently supported:

  • French (default)
  • English
  • Spanish
  • German

It's also possible to use the corrector with custom sources and alphabets for other languages.

Data used

  • fr :
    • CARPENTIER Nicolas-Joseph, Dictionnaire du bon language - link
    • Voltaire, Candide - link
  • en :
    • SHAKESPEARE William, All's Well That Ends Well - link
    • SHAKESPEARE William, Hamlet - link
  • es :
    • DE CERVANTES Miguel, Don Quijote - link
    • BAROJA Pío, Los Contrastes de la Vida - link
  • de :
    • KANT Immanuel, Kritik der reinen Vernunft - link
    • NIETZSCHE Friedrich, Ecce homo, Wie man wird, was man ist - link

Examples of use

# French correction
c = Corrector()
c.correct('orthografe')
>> orthographe

# English correction
c = Corrector(lang='en')
c.correct('mroinng')
>> morning

References

Spelling corrector based on that of Peter Norvig

Releases

No releases published

Packages

No packages published

Languages