By Pim Keizer
A simple example of some generic sparql queries for use in a search engine.
Search phrase: “Adidas”
Select all instances with label "Adidas".
WHERE {
?resource rdfs:label "Adidas" .
}
Find synonyms
Select all classes that are of the same type.
WHERE {
?resource rdfs:label "Adidas" .
?resource rdf:type ?type .
?synonyms rdf:type ?type .
}
Find other instances with the same type
Select all instances of the current type.
WHERE {
?resource rdfs:label "Adidas" .
?resource rdf:type ?type .
?objProp rdfs:range ?type .
?otherInstances ?objProp ?resource .
}
Find other classes with the same properties
Select all classes with the same properties as the current instance with :label "Adidas".
WHERE {
?resource rdfs:label "Adidas" .
?resource rdf:type ?type .
?objProp rdfs:range ?type .
?otherInstances ?objProp ?resource .
?otherInstances rdf:type ?otherClasses .
}

One Trackback
Palapple Blog | SEO Solutions for your Business…
Thanks for sharing. Search engine optimization is indeed one of the most crucial areas in Internet marketing, it is a perfect bridge between technology and business….