Guest User

Untitled

a guest
Oct 20th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. PREFIX ex: <http://www.semanticweb.org/caeleanb/ontologies/twittermap#>
  2. PREFIX dbo: <http://dbpedia.org/ontology/>
  3.  
  4. SELECT ?name (STR(?name) AS ?strip_name) ?name2
  5. WHERE {
  6. ?p ex:displayName ?name2 .
  7. SERVICE <http://dbpedia.org/sparql> {
  8. { ?s rdfs:label ?name .
  9. ?s rdf:type foaf:Person . }
  10. UNION
  11. { ?x rdfs:label ?name .
  12. ?x dbo:wikiPageRedirects ?s . }
  13.  
  14. }
  15. FILTER(STR(?name) = ?name2) .
  16. }
  17.  
  18. name strip_name name2
  19. John McCain (en) | John McCain | John McCain
  20. John McCain (de) | John McCain | John McCain
  21. John McCain (es) | John McCain | John McCain
  22. ...
  23.  
  24. PREFIX ex: <http://www.semanticweb.org/caeleanb/ontologies/twittermap#>
  25. PREFIX dbo: <http://dbpedia.org/ontology/>
  26.  
  27. SELECT ?name (STR(?name) AS ?strip_name) ?name2
  28. WHERE {
  29. ?p ex:displayName ?name2 .
  30. SERVICE <http://dbpedia.org/sparql> {
  31. { ?s rdfs:label ?name .
  32. ?s rdf:type foaf:Person .
  33. FILTER(?name="Bill Nye"@en)}
  34. UNION
  35. { ?x rdfs:label ?name .
  36. ?x dbo:wikiPageRedirects ?s .
  37. FILTER(?name="Bill Nye"@en)}
  38.  
  39. }
  40. FILTER(STR(?name) = ?name2) .
  41. }
  42.  
  43. name strip_name name2
  44. Bill Nye (en) | Bill Nye | Bill Nye
Add Comment
Please, Sign In to add comment