Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to extract synonyms from MeSH ontology?

In this level of my work, I need to extract a class synonyms from MeSH ontology. I am searching for the right syntax for the SPARQL query: how synonyms are they stored in MeSH? and how can I extract them?

like image 519
safé Avatar asked May 18 '11 14:05

safé


1 Answers

I am not sure what you mean by synonyms. But after looking at the MeSH ontology (downloaded from here). I run the following query to list all the different predicates:

SELECT DISTINCT ?p where { ?s ?p ?o }

... and I get ...

<http://www.w3.org/2004/02/skos/core#historyNote>
<http://www.nlm.nih.gov/mesh/2006#considerAlso>
<http://www.nlm.nih.gov/mesh/2006#recordAuthorizer>
<http://www.nlm.nih.gov/mesh/2006#dateEstablished>
<http://www.nlm.nih.gov/mesh/2006#dateCreated>
<http://www.nlm.nih.gov/mesh/2006#onlineNote>
<http://www.nlm.nih.gov/mesh/2006#activeMeSHYear>
<http://www.nlm.nih.gov/mesh/2006#historyNote>
<http://www.w3.org/2004/02/skos/core#related> <<<---
<http://www.w3.org/2004/02/skos/core#broader> <<<---
<http://www.nlm.nih.gov/mesh/2006#recordMaintainer>
<http://www.w3.org/2004/02/skos/core#scopeNote>
<http://www.w3.org/2004/02/skos/core#altLabel>
<http://www.w3.org/2004/02/skos/core#prefLabel>
<http://www.nlm.nih.gov/mesh/2006#preferredCombination> <<<---
<http://www.nlm.nih.gov/mesh/2006#publicMeSHNote>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2004/02/skos/core#annotation>
<http://www.w3.org/2004/02/skos/core#hiddenLabel>
<http://www.nlm.nih.gov/mesh/2006#recordOriginator>
<http://www.nlm.nih.gov/mesh/2006#runningHead>
<http://www.nlm.nih.gov/mesh/2006#dateRevised>

... the predicates with <<<--- make me suppose some sort relationship between resources.

For instance if we try skos:related with the following query:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?slabel ?olabel
WHERE {
  ?s skos:related ?o .
  ?s skos:prefLabel ?slabel .
  ?o skos:prefLabel ?olabel .
}

we get things like ...

"Anesthetics"   "Adjuvants, Anesthesia"
"Prostatic Neoplasms"   "Prostate-Specific Antigen"
"Elbow" "Tennis Elbow"
"Uterine Hemorrhage"    "Menorrhagia"
"Ecology"   "Environmental Health"
"Endocarditis, Bacterial"   "Aneurysm, Infected"
( .... and many more )

If you try skos:broader with the following query (prefixes omitted). Notice that skos:broader is used to define hierarchies of concepts, so it has different semantics than skos:related

SELECT ?slabel ?olabel
WHERE {
  ?s skos:broader ?o .
  ?s skos:prefLabel ?slabel .
  ?o skos:prefLabel ?olabel .
}

you get ...

"Healthy People Programs"   "Health Promotion"
"Suggestion"    "Hypnosis"
"Sodium Iodide" "Iodides"
"Unnecessary Procedures"    "Health Services Misuse"
"Bornanes"  "Norbornanes"
"Prajmaline"    "Ajmaline"
"Vestibular Nerve"  "Vestibulocochlear Nerve"
"Adenolymphoma" "Neoplasms, Complex and Mixed"
"Child, Gifted" "Child, Exceptional"
"Tooth Germ"    "Tooth Components"
"Breast Self-Examination"   "Self-Examination"
( ... and many more)

Bottom line, if you don't know the schema run some exploratory queries and try to see what's in there.

Edit: Queries for OWL file

@safé I think you are right, there are not such relations between classes in the OWL file you're using.

The following query gives you all the OWL classes:

SELECT DISTINCT ?p WHERE { ?s a <http://www.w3.org/2002/07/owl#Class> . }

... and this other one gives all predicates used in any class:

SELECT DISTINCT ?p WHERE { 
   ?s a <http://www.w3.org/2002/07/owl#Class> .
   ?s ?p ?o }

... this last query only returns:

<http://www.w3.org/2000/01/rdf-schema#subClassOf>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>

Actually in that OWL file you only have things like:

<http://org.snu.bike/MeSH#antimony_sodium_gluconate> rdf:type owl:Class .

and ...

<http://org.snu.bike/MeSH#antimony_sodium_gluconate> rdfs:subClassOf <http://org.snu.bike/MeSH#gluconate>.

This means that the only thing that is declared in that OWL file is a hierarchy of classes and no synonyms are declared.

If somehow you want to extract all subClasses do ...

SELECT * WHERE { 
?subClass <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?upperClass 
}
like image 65
Manuel Salvadores Avatar answered Sep 21 '22 03:09

Manuel Salvadores