dictionary
parent
4889d6cf47
commit
e457922cd4
@ -0,0 +1,23 @@
|
||||
from fileinput import close
|
||||
|
||||
words = set()
|
||||
|
||||
def check(word):
|
||||
if word.lower() in words:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def load(dictionary):
|
||||
file = open(dictionary, "r")
|
||||
for line in file:
|
||||
word = line.rstrip()
|
||||
words.add(word)
|
||||
close(file)
|
||||
return True
|
||||
|
||||
def size():
|
||||
return len(words)
|
||||
|
||||
def unload():
|
||||
return True
|
||||
Loading…
Reference in New Issue