问题描述
这是我的代码:
Dictionary format:
index["help"] = [5,[3,5,12,78]]
index["time"] = [2,[13,205]]
// format of dictionary: index[term] = [frequency,[posting list]]
a_file = open("index_data.dict","wb")
pickle.dump(index,a_file,-1)
a_file.close()
read_index = open("index_data.dict","rb")
output = pickle.load(read_index)
read_index.close()
有没有办法,当我在阅读腌制对象后打印字典时,我也可以打印偏移量,其中索引文件中的偏移量是从文件开头到相应发布列表的字节数开始?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)