def scrub(): words = load_words() chars = load_chars() fid = open(CHARMAP_PATH+'wordlist','w') specials = set(SPECIALS_LIST) for word in words: if word in specials: continue skip = False for t in word: # ignore words with bad symbols if t not in chars.keys(): print word skip = True break if not skip: fid.write(word+'\n') fid.close()
def scrub(): words = load_words() chars = load_chars() fid = open(CHARMAP_PATH + 'wordlist', 'w') specials = set(SPECIALS_LIST) for word in words: if word in specials: continue skip = False for t in word: # ignore words with bad symbols if t not in chars.keys(): print word skip = True break if not skip: fid.write(word + '\n') fid.close()
def loadPrefixTree(): lm = load_lm() chars = load_chars() words = load_words() return PrefixTree(chars,words,lm)
def loadPrefixTree(): lm = load_lm() chars = load_chars() words = load_words() return PrefixTree(chars, words, lm)