示例#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