예제 #1
0
파일: dict.py 프로젝트: LiChenda/Dict
def intitfromfile(filename):
    words = [] 
    with open(filename, 'r') as f:
        words = json.load(f)
    for word in words:
        dic_tree.insert_word(word['word'],json.dumps(word))
예제 #2
0
파일: dict.py 프로젝트: LiChenda/Dict
def insertWord(item):
    dic_tree.insert_word(item['word'], json.dumps(item))
    return