On 13/05/2013, Luca Matteis <[email protected]> wrote: > How about using a little FILTER and REGEX in the SPARQL query to DBpedia > (no need to touch Wikipedia's API): > > SELECT ?university ?website ?title > WHERE { ?university <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < > http://dbpedia.org/ontology/University>. > ?university dbpedia2:website ?website. > ?university rdfs:label ?title. > FILTER(REGEX(?title, "Cambridge")) . > }
Hi Luca, Thanks for this. I see now that I should also have mentioned in my first email that I'm seeking not only the URL for the university's website but also the official name for the university; my apologies for that omission. Anyhow, the first step in my solution obtains this reasonably reliably - as long as I'm willing to tweak and resubmit the ostensible name until Wikipedia returns a result - since the title of a university's Wikipedia article is typically also the official name of the university; but I probably shouldn't rely on this being the case. So, I think you're right that it may make more sense for me to to query DBpedia rather than Wikipedia for this; and also that I may be able to obtain both pieces of information (university official name; university website homepage URL) with a single query. Much appreciated, Sam
