Merge pull request #40 from blairg23/master
Added os.getcwd() to example script to make it more OS agnostic. Also…
This commit is contained in:
commit
843621abc2
@ -4,7 +4,7 @@ english-words
|
||||
A text file containing 466k English words.
|
||||
|
||||
While searching for a list of english words (for an auto-complete tutorial)
|
||||
I found: http://stackoverflow.com/questions/2213607/how-to-get-english-language-word-database which refers to http://www.infochimps.com/datasets/word-list-350000-simple-english-words-excel-readable
|
||||
I found: http://stackoverflow.com/questions/2213607/how-to-get-english-language-word-database which refers to ~~http://www.infochimps.com/datasets/word-list-350000-simple-english-words-excel-readable~~ (link no longer available).
|
||||
|
||||
No idea why infochimps put the word list inside an excel (.xls) file.
|
||||
|
||||
|
@ -3,7 +3,7 @@ import os, sys
|
||||
|
||||
def load_words():
|
||||
try:
|
||||
filename = os.path.dirname(sys.argv[0])+"\\"+"words_dictionary.json"
|
||||
filename = os.path.join(os.getcwd(), "words_dictionary.json")
|
||||
with open(filename,"r") as english_dictionary:
|
||||
valid_words = json.load(english_dictionary)
|
||||
return valid_words
|
||||
|
Loading…
x
Reference in New Issue
Block a user