repl.it
@PYer/

Spell Check

Python

No description

fork
loading
Files
  • main.py
  • spellcheck
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Spell check example...

import spellcheck

print('What is your favorite color? Please keep it simple... No need to spell it completely right :)')

while True:
  typ = input('Color: ')
  opts = 'red orange yellow green blue purple black white pink magenta brown turqouise grey gray charcoal silver gold bronze'.split()

  if typ in opts:
    print('Cool...')
    break
  
  meant = spellcheck.comp_list(typ, opts, minsim=0.4)
  print('Did you mean:', ', '.join(meant))
?