2

我正在尝试在我的系统上本地设置ConceptNet5(链接) 。ConceptNet 有 3 个 API Lookup、Search 和 Association api,在这个页面(链接)上给出。我尝试按照Running your own copy中的说明在本地设置这些 API 。最后“make all”的命令成功完成了一半的过程,这使得查找和搜索api在本地工作,但关联ap​​i在本地工作,因为“make all”在两者之间出错。所以基本上,我的 sqlite 数据库有用于查找和搜索的数据,但缺少关联 api 的数据。我在执行“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)上的代码。但是还没有找到任何解决方案。帮助表示赞赏。

4

0 回答 0