我正在尝试在我的系统上本地设置ConceptNet5 (link)。 ConceptNet有3个API查找,搜索和关联api,它被提供给this page(link)。我尝试在Running your own copy描述的本地设置这些Apis。最后的命令" make all"成功完成了一半的过程,这使得查找和搜索apis在本地工作,但是关联api不能在本地工作,因为#34; make all"之间给出了错误。所以基本上,我的sqlite数据库有查找和搜索的数据,但缺少关联api的数据。我在做#34; make all"
时遇到了这个错误if [ ! -e ~/.conceptnet5 ]; then ln -s /media/D8849AB0849A911C/conceptnet_data_home/data ~/.conceptnet5; fi
python3 -m conceptnet5.builders.merge_vector_spaces /media/D8849AB0849A911C/conceptnet_data_home/data/assoc/subspaces
Merging: part_00 + part_01 -> merged_a0
Traceback (most recent call last):
File "/usr/local/lib/python3.4/runpy.py", line 171, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.4/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/root/Downloads/conceptNet_new_python2.7/conceptnet5/conceptnet5/builders/merge_vector_spaces.py", line 58, in <module>
merge_8_vector_spaces(args.input_dir)
File "/root/Downloads/conceptNet_new_python2.7/conceptnet5/conceptnet5/builders/merge_vector_spaces.py", line 18, in merge_8_vector_spaces
merge_vector_spaces(subspace_dir, mergers)
File "/root/Downloads/conceptNet_new_python2.7/conceptnet5/conceptnet5/builders/merge_vector_spaces.py", line 46, in merge_vector_spaces
merged = spaceA.merged_with(spaceB, k=k)
AttributeError: 'AssocSpace' object has no attribute 'merged_with'
make: *** [/media/D8849AB0849A911C/conceptnet_data_home/data/assoc/assoc-space-5.3/u.npy] Error 1
它给代码中的错误,我无法弄清楚。我怎样才能让它发挥作用。我检查了Github(link)上的代码。但还没有找到任何解决方案。感谢帮助。