我有一个实例列表如下。
myinstances = ['word2vec', 'tf-idf', 'dijkstra's algorithm']
对于每个myinstance
在上面的列表中,我想找到:
1. What are the other instances of `myinstance`'s category (i.e. only one hop)
2. What are the instances of `myinstance`'s category's category (i.e. two hops)
例如,如果我们考虑myinstance = word2vec
What are the other instances of myinstance
's category (i.e. only one hop)?
As shown in the figure below the other instances of its immediade ancestor is GloVe.
有哪些事例myinstance
的类别的类别(即两跳)?换句话说,有哪些实例embedding
(距离word2vec
)如下图所示。
我只是想知道这样的查询搜索是否可以在 sparql 中执行?
我当前的代码如下。
SELECT * {
VALUES ?searchTerm { "word2vec" "tf-idf" "dijkstra's algorithm" }
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "EntitySearch".
bd:serviceParam wikibase:endpoint "www.wikidata.org".
bd:serviceParam wikibase:limit 1 .
bd:serviceParam mwapi:search ?searchTerm.
bd:serviceParam mwapi:language "en".
?item wikibase:apiOutputItem mwapi:item.
?num wikibase:apiOrdinal true.
}
?item (wdt:P279|wdt:P31) ?type
}
如果需要,我很乐意提供更多详细信息。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)