Open wsjgithub opened 3 years ago
查了几个词,发现pos里都是空的,这个是怎么回事?我就是把ecdict.csv转化成了sql,然后query了一些词,每个词的pos都是空的。
convert_dict(‘stardict.db', 'ecdict.csv') db = os.path.join(os.path.dirname(__file__), 'stardict.db') t = time.time() sd = StarDict(db, False) print(time.time() - t) print(sd.query('sensational')) 得到 {'id': 625203, 'word': 'sensational', 'sw': 'sensational', 'phonetic': "sen'seiʃәnl", 'definition': 'a. causing intense interest, curiosity, or emotion\na. relating to or concerned in sensation', 'translation': 'a. 使人感动的, 非常好的', 'pos': '', 'collins': 1, 'oxford': None, 'tag': 'toefl', 'bnc': 8618, 'frq': 9888, 'exchange': '', 'detail': None, 'audio': ''}
convert_dict(‘stardict.db', 'ecdict.csv') db = os.path.join(os.path.dirname(__file__), 'stardict.db') t = time.time() sd = StarDict(db, False) print(time.time() - t) print(sd.query('sensational'))
{'id': 625203, 'word': 'sensational', 'sw': 'sensational', 'phonetic': "sen'seiʃәnl", 'definition': 'a. causing intense interest, curiosity, or emotion\na. relating to or concerned in sensation', 'translation': 'a. 使人感动的, 非常好的', 'pos': '', 'collins': 1, 'oxford': None, 'tag': 'toefl', 'bnc': 8618, 'frq': 9888, 'exchange': '', 'detail': None, 'audio': ''}
不是所有词都有数据呗
另,请用 stardict.7z 里面的数据库,ecdict.csv 只是个子集。
查了几个词,发现pos里都是空的,这个是怎么回事?我就是把ecdict.csv转化成了sql,然后query了一些词,每个词的pos都是空的。
convert_dict(‘stardict.db', 'ecdict.csv') db = os.path.join(os.path.dirname(__file__), 'stardict.db') t = time.time() sd = StarDict(db, False) print(time.time() - t) print(sd.query('sensational'))
得到{'id': 625203, 'word': 'sensational', 'sw': 'sensational', 'phonetic': "sen'seiʃәnl", 'definition': 'a. causing intense interest, curiosity, or emotion\na. relating to or concerned in sensation', 'translation': 'a. 使人感动的, 非常好的', 'pos': '', 'collins': 1, 'oxford': None, 'tag': 'toefl', 'bnc': 8618, 'frq': 9888, 'exchange': '', 'detail': None, 'audio': ''}