项目作者: thmslmr

项目描述 :
✅ Spelling corrector - Python
高级语言: Python
项目地址: git://github.com/thmslmr/Spelling-Corrector.git
创建时间: 2016-11-18T12:04:28Z
项目社区:https://github.com/thmslmr/Spelling-Corrector

开源协议:

下载


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

  1. # French correction
  2. c = Corrector()
  3. c.correct('orthografe')
  4. >> orthographe
  5. # English correction
  6. c = Corrector(lang='en')
  7. c.correct('mroinng')
  8. >> morning

References

Spelling corrector based on that of Peter Norvig