用apaches建立Conceptnet

2024-05-21 01:18:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用常识推理。在这本书里,我遇到了一个很酷的东西,叫做Conceptnethttp://conceptnet5.media.mit.edu/。还有一个搜索页面,用于搜索不同的概念。{这是^的。 我想通过python使用它。我试过这个Calling conceptnet through api calls(link)。但是 我想用python和ubuntu在本地机器上设置它。他们给出了设置Setting concpetnet locally(link)的方法。在这方面,他们使用sqlite作为索引。但我想知道如何使用apachesolr实现同样的目的。我是apachesolr的新手,所以使用apachesolr代替odsqlite是可能的吗?这会改变下面的方法吗?这个方法现在被用于通过python调用conceptnet。在

>>> from conceptnet5.query import lookup
>>> for assertion in lookup('/c/en/example'):
...     print(assertion)

感谢帮助。谢谢:)


Tags: 方法概念mitlink页面lookupmediaedu
2条回答

本段:

Using SQLite is a tradeoff; we can't write to it as quickly as we did to Solr, but on the other hand, once the data is in it, it's easier to run and uses less RAM than Solr.

这似乎表明他们曾经使用Solr并切换到SQLite。所以使用Solr可能不再容易了。你最好的办法就是给他们发一封电子邮件,然后问他们。在

考虑通过独立docker VM映像运行ConceptNet。您可以使用web或api版本,或者“完全”部署使您能够完全访问技术堆栈:

https://github.com/commonsense/conceptnet5/wiki/Docker

相关问题 更多 >