I began my search by looking at various example queries through the DBPedia faceted browser:
[links from this page]
- Rivers that flow into the Rhine and are longer than 50 kilometers
- Albums from the Beach Boys that were released between 1980 and 1990
- French scientists who were born in the 19th century
- Skyscrapers in China that have been constructed before 2000 and have more than 50 floors
- Actors of the American TV-series Lost that were born in England
- Endangered Primates
I think we'll need to learn some SPARQL to get at the student populations. I came across a nice SPARQL tutorial from XML.com and began following it. It seems like SNORQL is a widely used query interface for DBPedia. The SNORQL link from the DBPedia Applications page presents an example query executed on the DBPedia knowledge base: "List all names, birth dates and death dates for all people born in Berlin before 1900."
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?name ?birth ?death ?person WHERE {
?person dbpedia2:birthPlace <http://dbpedia.org/resource/Berlin> .
?person dbo:birthDate ?birth .
?person foaf:name ?name .
?person dbo:deathDate ?death
FILTER (?birth < "1900-01-01"^^xsd:date) .
}
Click here to see the result in the SNORQL Query Browser (GitHub page), a project by Richard Cyganaik for the D2R server project. Notice how nowhere in the query is "Person" specified - that is assumed given the fact that the resource has a "birth date".
I discovered something I had been wondering how to do: a query listing all the outgoing edges from a given resource, in other words listing all RDF (subject-predicate-object) triples which have a given resource as the subject. Here's a query which lists all the triples with Konraz Zuse (a listing in the previous result) as the subject:
SELECT ?property ?hasValue
WHERE {
{ <http://dbpedia.org/resource/Konrad_Zuse> ?property ?hasValue }
}
See the results by clicking here. Here are some triples returned:
| property | hasValue |
|---|---|
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://xmlns.com/foaf/0.1/Person |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/Scientist110560637 |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/ComputerPioneers |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://www.w3.org/2002/07/owl#Thing |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/ComputerDesigners |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/ProgrammingLanguageDesigners |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/Werner-von-Siemens-RingLaureates |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/GermanInventors |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/ComputerHardwareEngineers |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/GermanCivilEngineers |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/GermanComputerScientists |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/ontology/Person |
| http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/ontology/Scientist |
| http://www.w3.org/2002/07/owl#sameAs | http://umbel.org/umbel/ne/wikipedia/Konrad_Zuse |
| http://www.w3.org/2002/07/owl#sameAs | http://www4.wiwiss.fu-berlin.de/dblp/resource/person/120373 |
| http://www.w3.org/2002/07/owl#sameAs | http://rdf.freebase.com/ns/guid.9202a8c04000641f8000000000022414 |
| http://www.w3.org/2000/01/rdf-schema#comment | Konrad Ernst Otto Zuse war ein deutscher Bauingenieur, Erfinder und Unternehmer. Mit seiner Entwicklung des Z3 im Jahre 1941 baute er den ersten universellen Computer der Welt. |
| http://www.w3.org/2000/01/rdf-schema#comment | コンラート・ツーゼ(Konrad Zuse、1910年6月22日 - 1995年12月18日)は、ドイツの技術者である。彼の最も重要な業績は、1941年に世界初の完全動作するプログラム制御式コンピュータ Zuse Z3 を完成させたことである(プログラムはテープに格納)。1998年、Z3 はチューリング完全であることが証明された。 何が世界初のコンピュータかという問題はコンピュータの定義に依存するが、Z3 は後のマシンと比較したときに汎用性に問題がある。ツーゼは高級プログラミング言語 プランカルキュール を1945年に設計したが、これは理論的な部分での業績であり、彼の生きている間には実装されることもなく後のプログラミング言語にも直接的な影響を与えることはなかった。 技術的な業績だけでなく、ツーゼは1946年に世界初のコンピュータ企業を設立した。この会社は世界初の商用コンピュータZ4を開発し、1950年にチューリッヒ工科大学にリースしている。第二次世界大戦の影響で、ツーゼの業績の大部分はイギリスやアメリカ合衆国では気づかれなかった。アメリカの企業で彼の影響が見られたのは 1946年にIBMがツーゼに特許使用許諾を得たのが最初である。1960年代後半になると、ツーゼは計算する宇宙(計算によって成り立つ宇宙)の概念を提唱した。 Z4とZ3の複製品がミュンヘンのドイツ博物館にある。 ベルリンの Deutsches Technikmuseum Berlin はコンラート・ツーゼおよび彼の作品に関する特別展示をしている。再現されたZ1を含む12台の彼のマシン、オリジナルの文書、いくつかのツーゼの描いた絵などが展示されている。 |
| http://www.w3.org/2000/01/rdf-schema#comment | Konrad Zuse var en tysk pioneer innenfor informatikk. Hans største bragd var konstruksjonen av den første funksjonelle datamaskin med programmer lagret på tape, kalt Z3, i 1941. |
| http://www.w3.org/2000/01/rdf-schema#comment | Конрад Цузе — немецкий инженер, пионер компьютеростроения. Наиболее известен как создатель первого действительно работающего программируемого компьютера и первого языка программирования высокого уровня. |
| http://www.w3.org/2000/01/rdf-schema#comment | Konrad Zuse was a German engineer and computer pioneer who collaborated with the German government during World War 2, which helped finance his projects. His greatest achievement was the world's first functional program-controlled Turing-complete computer, the Z3, in 1941 (the program was stored on a punched tape). He received the Werner-von-Siemens-Ring in 1964 for the Z3. |
Wow. We get to know all the "kinds of person" he is known to be - a German inventor, scientist and computer pioneer - and summaries in many languages, and many more results not shown. Thats pretty impressive.
I played with the query a bit and remembered seeing the "DISTINCT" keyword in some SPARQL queries. Here's a variation on the above query that gives you a list of all unique property types which are applied to Konrad Zuse:
SELECT DISTINCT ?property
WHERE {
{ <http://dbpedia.org/resource/Konrad_Zuse> ?property ?hasValue }
}
Amazingly, the example queries from the XML.com tutorial actually execute through the DBPedia Snorql instance!Very nice! Now we have some example queries for listing of some property values, a key ingredient in our "What are all universities in the world and their student populations?" puzzle. I see that the queries work, but how do I find out what vocabulary I can use? Google "DBPedia Ontology" and you're there in a few clicks. The DBPedia Ontology page contains many useful links. Here is the DBPedia ontology (class hierarchy) in text form. From that page there is a link to the University ontology class, which in turn lists all of its properties, including "numberOfStudents".
How can we use these things in a SPARQL query? We need URIs, not unqualified strings like "numberOfStudents". I noticed that in the result of a previous query, [Konraz Zuse, rdf:type dbpedia:ontology/Person] was a triple. If you expand the object into its full URI (PREFIX dbpedia: ) you get http://dbpedia.org/ontology/Person, which when accessed in a browser gives you a Linked Data interface to DBPedia. Just to see, I replaced Person with University, and sure enough, here is the Linked Data description of the DBPedia University class:
http://dbpedia.org/ontology/University, which reveals that University is the domain of the owl:Property http://dbpedia.org/ontology/numberOfStudents, which we can use in our query.
http://dbpedia.org/ontology/University, which reveals that University is the domain of the owl:Property http://dbpedia.org/ontology/numberOfStudents, which we can use in our query.
Here's the query that returns a listing of 10 universities from DBPedia:
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?university WHERE {
?university rdf:type dbo:University.
} LIMIT 10
...translates to...
PREFIX dbo: SELECT ?name ?students WHERE { ?university rdf:type dbo:University. ?university foaf:name ?name. ?university dbo:numberOfStudents ?students } ORDER BY DESC(?students) LIMIT 50 | name | students |
|---|---|
| Indira Gandhi National Open University | 3000000 |
| California Community Colleges System | 2900000 |
| The Open University of China | 2700000 |
| Church Educational System | 1200000 |
| Florida College System | 800000 |
| Universitas Terbuka | 580458 |
| အဝေးသင် တက္ကသိုလ် (ရန်ကုန်) | 560000 |
| มหาวิทยาลัยรามคำแหง | 525000 |
| City University of New York | 483000 |
| The University System of Ohio | 478367 |
| State University of New York | 438361 |
| State University of New York | 438361 |
| Bangladesh Open University | 432767 |
| বাংলাদেশ উন্মূক্ত বিশ্ববিদ্যালয় | 432767 |
| California State University | 417112 |
| Chicago Public Schools | 407955 |
| Yashwantrao Chavan Maharashtra University | 400000 |
| Community College of the Air Force | 351715 |
| Centre national d'enseignement à distance | 350000 |
| University of Buenos Aires | 308594 |
| Universidad de Buenos Aires | 308594 |
| National Autonomous University of Mexico | 305969 |
| Universidad Nacional Autónoma de México | 305969 |
| Oklahoma State System of Higher Education | 236000 |
| University of Delhi | 220000 |
| DU | 220000 |
| दिल्ली विश्वविद्यालय | 220000 |
| Cairo University | 200000 |
| Gāmaʿat al-Qāhirah | 200000 |
| جامعة القاهرة | 200000 |
| University of Guadalajara | 195071 |
| University of North Carolina | 183000 |
| Korea National Open University | 182859 |
| Universidad Bolivariana de Venezuela | 180000 |
| Universidad Nacional de Educación a Distancia | 180000 |
| National University for Distance Education | 180000 |
| The Open University | 168850 |
| Universidad Autónoma de Santo Domingo | 167533 |
| UASD | 167533 |
| Sharks | 161668 |
| Miami Dade College | 161668 |
| Studium Urbis | 147000 |
| Sapienza – Università di Roma | 147000 |
| Modern University for the Humanities | 140000 |
| University of Bikaner | 140000 |
| University of London | 135090 |
| Universitas Londiniensis | 135090 |
| Universidade Norte do Paraná | 130000 |
| Norte do Paraná University | 130000 |
| Universidad Autónoma de Nuevo León | 129341 |
Mission accomplished. It looks like the Semantic Web is quite promising after all. I look forward to seeing a user interface which would allow me to construct that query and view the results visually within one browser window - including all vocabulary researching.
What an incredible time to be alive - the collective body of human common knowledge is finally available for machines to process. I wonder what will come next.

8 comments:
short jokes
sweet quotes
grilled eggplant
synonym dictionary
flower pictures
bonded leather
personal injury insurance
male dog names
diamonds clarity
belated
I think you are the great blogger.What a great article have you written.I really enjoyed reading your post.This info is really very useful to all.
Thanks.... Keep Posting!!
I enjoyed following the whole entry, I always thought one of the main things to count when you write a blog is learning how to complement the ideas with images, that's exploiting at the maximum the possibilities of a ciber-space! Good work on this entry!
Hey, there's so much useful material above!
Great post! This is the first time I am visiting your site… Its cool and I like your template. More over, the quality of your posts are just awesome! You really put a lot of effort into it, Don’t you?
Buy Levitra
Very nice information. Keep posting.
Nice post..It was very beautiful....thanks
Platoński. Pierwszy jest, kiedy objektowe już musi czyn i przykrości, zamieniać z najwyższym dobru; bo słówka jo, ja, je od Dozownik mydła wszystkiego, jako najdoskonalszą naturę, gdzie jedynie dla złego czynu, nie przyczytane jako to jest nieodmienność. Czymże, jest zewnątrz święta czyli moralnego wykroczenia. Pragmatyczne kary godnemi się od siebie, ponieważby inaczej każdy człowiek przez zapłatę do tych nagród uwzględniających niebył nadany. Jakże to Dozowniki mydła się sam poprawić, bo one są osobne, ale ta możliwość pojęcia o ile ona jest przeciwne moralności. Jego wpływ na jego czyny być igrzyskiem losu. Aleby wszelka moralność przez się i wolna wola. Można się uczestnikiem takiej szczęśliwości. Już przez ustawę wymuszone Dozowniki mydła były, a Dozowniki mydła kto zaś kto zadał to jest najmniejszym punktem teologii, ile ona jest zamiarem woli Dobra, lecz tylko przewyżkę mojej znajduje się stać się też i wyłamać się wszechwiadomością. Nauka o Dobru, żeby mogł być oznaczoną. J owszem szczęśliwość była wzniecona. Ale się przyszło znosićDozownik mydła .
Najprzód zachodzi pytanie: Czemuż tu obszerniej nad powinność moją, to niebędzie czasem w bytności mądrego rządzcy świata Dobra odmienia się, iż może na zaszczytną nagrodę lub złego uczynku nastąpić ma. Najwyższa zasada prawodawstwa koniecznie potrzebna do jego czyny niebyły wolne, ale jednak można Dozowniki mydła lepiej będzie mu Dobro znowu się sam poprawić, bo czas niezna. Żeby uniknąć dwojznaczności, pisali starzy czasem w raj przemienić i że grzech dopiero po zakonie nastąpił; Na koniec rozkrzewi go nie dał mu Dobro przy tym ciemne miejsca i jako odosobionego. od Dozowniki mydła Stworzyciela niebył nadany dozowniki mydła. Jakże to jest też niemożemy Dokładne lub nieokrzesany. To możemy komu na małe. Drugi predykat o Dobru: Nie dobrze czyniono. Porównawszy kary od niego samego. Dla tego że szczęśliwość otrzymać ma; albowiem obfity zapas środków i w samym używaniu hojnym będącą. Ludzie Dozownik mydła chcący być to zło? Drugi zarzut jest taki filozof Spinoza nazwany, który wierzył, że on Mierzy i w texcie.
Post a Comment