spellcheck.py
h
PYer (2764)

spellcheck.py

This is a python library I coded to generate spelling suggestions. I was going to implement it into a chat robot later but I haven't done it yet. It basically checks for similarity between a typed word and a list of words. It runs throught 3 test cases to compare the order, position, and count of all letters in both words.
I hope you like it, and I'm interested to see what people (if any) create with this! I have supplied a few examples below of code and output:


Other possible results:


You are viewing a single comment. View All
hamzawsome7 (0)

@hamzawsome7 the current code is:

import spellcheck
feeling = input("Hi, how are you feeling today? ")
feeling = feeling.lower()
goodfeel = 'cheerful contented delighted ecstatic elated glad joyful joyous jubilant lively merry overjoyed peaceful pleasant pleased thrilled upbeat'.split()

while feeling in goodfeel:
print('Cool...')
break

meant = spellcheck.comp_list(feeling, goodfeel, minsim=0.4)
print('Did you mean:', ', '.join(meant))