def __load_dictionary(self, config):
var = config.get_value('engine/replace-with-kanji-python', 'dictionary')
if var is None or var.get_type_string() != 's':
path = os.path.join(os.getenv('IBUS_REPLACE_WITH_KANJI_LOCATION'), 'restrained.dic')
if var:
config.unset('engine/replace-with-kanji-python', 'dictionary')
else:
path = var.get_string()
return Dictionary(path)
评论列表
文章目录