有没有一种方法可以用 sparql 选择所有类别的 MeSH [英] is there a method to select all categories MeSH with sparql

查看:65
本文介绍了有没有一种方法可以用 sparql 选择所有类别的 MeSH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从医学主题词 RDF 中获取带有 sparql 的数据

i want to get data with sparql from Medical Subject Headings RDF

我尝试执行此代码:

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX meshv: <http://id.nlm.nih.gov/mesh/vocab#>
PREFIX mesh: <http://id.nlm.nih.gov/mesh/>
PREFIX mesh2015: <http://id.nlm.nih.gov/mesh/2015/>
PREFIX mesh2016: <http://id.nlm.nih.gov/mesh/2016/>
PREFIX mesh2017: <http://id.nlm.nih.gov/mesh/2017/>

SELECT DISTINCT ?descriptor ?label
FROM <http://id.nlm.nih.gov/mesh>

WHERE {
mesh:D009369 meshv:treeNumber ?treeNum .
?childTreeNum meshv:parentTreeNumber+ ?treeNum .
?descriptor meshv:treeNumber ?childTreeNum .
?descriptor rdfs:label ?label .
}

ORDER BY ?label

此代码返回

 descriptor     label
mesh:D000182    ACTH Syndrome, Ectopic
mesh:D049913    ACTH-Secreting Pituitary Adenoma
mesh:D000008    Abdominal Neoplasms

但我想从这个页面获取例如 https://meshb.nlm.nih.gov/record/ui?ui=D000172 :

but me i want to get from this page for example https://meshb.nlm.nih.gov/record/ui?ui=D000172 :

Musculoskeletal Diseases [C05]
Bone Diseases [C05.116]
Bone Diseases, Endocrine [C05.116.132]
Acromegaly [C05.116.132.082]
Congenital Hypothyroidism [C05.116.132.256]
.........

但我想从网格中收集所有数据(带标签的代码),不仅仅是这个例子

but i want to collect all data (code with label) from mesh, not only this example

推荐答案

我知道我不是在回答你的问题,但你在开头遗漏了 rdfs 前缀...

I know I'm not answering your question, but you are missing the rdfs prefix in the beginning...

前缀rdfs:http://www.w3.org/2000/01/rdf-schema#

保罗

这篇关于有没有一种方法可以用 sparql 选择所有类别的 MeSH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆