-
Notifications
You must be signed in to change notification settings - Fork 0
/
__main__.py
37 lines (34 loc) · 1.14 KB
/
__main__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import __init__
import sys
'''
Test cases:
- Common words mispelled
- Concepts mispelled. Context inferable from correct words
- Concepts
'''
sentences = ['I want to go to the beach to sit on a tawel',
'I wan to go to te beachh to sit on a tawel',
'I liek to sing udner the rainn',
'I like to sunbathe at the bech',
'I like to snbathe at the bech',
'When we go on bacation we liek to sail in the sey',
'At the beach it is important to have an umbral',
'Sail in the sey',
'Swim in the sey',
'I want to eta at that restaurant',
'I want to eta at that restrautant',
'I liek caek for dessert'
]
if "-i" in sys.argv:
while True:
print " "
sentence = raw_input('Write a sentence: ')
print "Spellsense: " + __init__.check(sentence)
print "Enchant: " + __init__.dumbcheck(sentence)
print " "
else:
for sentence in sentences:
print "*"+sentence
print "Spellsense: " + __init__.check(sentence)
print "Enchant: " + __init__.dumbcheck(sentence)
print " "