dbpediaの研究 その17
概要
dbpediaが難解なので、手出してみる。
動くsparqlを、集めてみた。
結果
select distinct *
where {
?s prop-ja:色 ?o .
}
limit 10
select distinct ?o
where {
?s rdf:type ?o.
}
LIMIT 10
select *
where {
?s ?p dbpedia-ja:凶器 .
}
select *
where {
?s ?p ?o .
}
LIMIT 10
SELECT ?director, COUNT(?director) AS ?count
WHERE {
?film dbpedia-owl:director ?director
}
GROUP BY ?director
ORDER BY DESC (?count)
SELECT ?author, ?masterpiece
WHERE {
dbpedia-ja:ドラえもん prop-ja:作者 ?author.
?author prop-ja:代表作 ?masterpiece.
}
SELECT DISTINCT ?label ?depiction
WHERE {
?s prop-ja:genre <http://ja.dbpedia.org/resource/ロック_(音楽)> ;
rdfs:label ?label .
OPTIONAL {
?s foaf:depiction ?depiction .
}
}
SELECT ?birth_date
WHERE {
dbpedia-ja:ビートたけし dbpedia-owl:birthDate ?birth_date.
}
SELECT DISTINCT *
WHERE {
dbpedia-ja:軽自動車 dbpedia-owl:abstract ?abstract .
}
SELECT DISTINCT *
WHERE {
dbpedia-ja:赤湯 ?p ?o .
}
SELECT DISTINCT *
WHERE {
<http://ja.dbpedia.org/resource/フクジュソウ> ?p ?o .
}
SELECT distinct ?name ?abstract ?url ?lat ?lon
WHERE {
?s rdfs:label ?name ;
dbpedia-owl:abstract ?abstract ;
foaf:isPrimaryTopicOf ?url ;
geo:lat ?lat ;
geo:long ?lon .
}
LIMIT 10
select *
where {
?link a dbpedia-owl:Station;
rdfs:label ?title;
geo:lat ?lat;
geo:long ?long.
}
limit 10
select ?movieName ?directorName ?runningTime
where {
?movie rdf:type dbpedia-owl:Film;
prop-ja:上映時間 ?runningTime;
rdfs:label ?movieName;
dbpedia-owl:director ?director.
?director rdfs:label ?directorName.
filter(?runningTime < 80)
}
order by desc(?runningTime) ?director
limit 5
SELECT DISTINCT ?person count(?war) AS ?c
WHERE {
{
?war dbpedia-owl:wikiPageWikiLink category-ja:日本の戦国時代の戦い
}
UNION {
?war dbpedia-owl:wikiPageWikiLink category-ja:安土桃山時代の戦い
}
?war dbpedia-owl:opponents ?person .
}
GROUP BY ?person
ORDER BY DESC(?c)
select *
where {
?uri dbpedia-owl:wikiPageWikiLink category-ja:日本百名山.
?uri rdf:type schema:Mountain.
?uri foaf:name ?name.
?uri foaf:depiction ?image.
?uri prop-ja:標高 ?altitude.
}
order by ?altitude
select distinct ?pref (count(?s) AS ?c)
where {
?pref rdf:type dbpedia-owl:Place.
?pref dbpedia-owl:wikiPageWikiLink category-ja:日本の都道府県.
?s rdf:type dbpedia-owl:Person;
dbpedia-owl:wikiPageWikiLink category-ja:日本のアイドル;
dbpedia-owl:birthPlace ?pref.
}
GROUP BY ?pref
ORDER BY ?c
SELECT AVG(?countOfWorks) AS ?avgOfWorks
WHERE {
SELECT ?author, (COUNT(?works) AS ?countOfWorks)
WHERE {
?author dbpedia-owl:notableWork ?works
}
GROUP BY ?author
}
SELECT ?director, COUNT(?director) AS ?count
WHERE {
?film dbpedia-owl:director ?director
}
GROUP BY ?director
ORDER BY DESC(?count)
SELECT ?wikiLink
WHERE {
dbpedia-ja:アメリカ合衆国 dbpedia-owl:wikiPageWikiLink ?wikiLink.
}
LIMIT 10 OFFSET 10
SELECT ?author, ?masterpiece
WHERE {
dbpedia-ja:ドラえもん prop-ja:作者 ?author.
?author prop-ja:代表作 ?masterpiece.
}
SELECT ?o
WHERE {
dbpedia-ja:日本 prop-ja:国歌 ?o.
}
select distinct *
where {
?s prop-ja:色 ?o .
}
limit 10
select distinct ?o
where {
?s rdf:type ?o.
}
LIMIT 10
select *
where {
?s ?p dbpedia-ja:凶器 .
}
select *
where {
?s ?p ?o .
}
LIMIT 10
SELECT ?director, COUNT(?director) AS ?count
WHERE {
?film dbpedia-owl:director ?director
}
GROUP BY ?director
ORDER BY DESC (?count)
SELECT ?author, ?masterpiece
WHERE {
dbpedia-ja:ドラえもん prop-ja:作者 ?author.
?author prop-ja:代表作 ?masterpiece.
}
SELECT DISTINCT ?label ?depiction
WHERE {
?s prop-ja:genre <http://ja.dbpedia.org/resource/ロック_(音楽)> ;
rdfs:label ?label .
OPTIONAL {
?s foaf:depiction ?depiction .
}
}
SELECT ?birth_date
WHERE {
dbpedia-ja:ビートたけし dbpedia-owl:birthDate ?birth_date.
}
SELECT DISTINCT *
WHERE {
dbpedia-ja:軽自動車 dbpedia-owl:abstract ?abstract .
}
SELECT DISTINCT *
WHERE {
dbpedia-ja:赤湯 ?p ?o .
}
SELECT DISTINCT *
WHERE {
<http://ja.dbpedia.org/resource/フクジュソウ> ?p ?o .
}
SELECT distinct ?name ?abstract ?url ?lat ?lon
WHERE {
?s rdfs:label ?name ;
dbpedia-owl:abstract ?abstract ;
foaf:isPrimaryTopicOf ?url ;
geo:lat ?lat ;
geo:long ?lon .
}
LIMIT 10
select *
where {
?link a dbpedia-owl:Station;
rdfs:label ?title;
geo:lat ?lat;
geo:long ?long.
}
limit 10
select ?movieName ?directorName ?runningTime
where {
?movie rdf:type dbpedia-owl:Film;
prop-ja:上映時間 ?runningTime;
rdfs:label ?movieName;
dbpedia-owl:director ?director.
?director rdfs:label ?directorName.
filter(?runningTime < 80)
}
order by desc(?runningTime) ?director
limit 5
SELECT DISTINCT ?person count(?war) AS ?c
WHERE {
{
?war dbpedia-owl:wikiPageWikiLink category-ja:日本の戦国時代の戦い
}
UNION {
?war dbpedia-owl:wikiPageWikiLink category-ja:安土桃山時代の戦い
}
?war dbpedia-owl:opponents ?person .
}
GROUP BY ?person
ORDER BY DESC(?c)
select *
where {
?uri dbpedia-owl:wikiPageWikiLink category-ja:日本百名山.
?uri rdf:type schema:Mountain.
?uri foaf:name ?name.
?uri foaf:depiction ?image.
?uri prop-ja:標高 ?altitude.
}
order by ?altitude
select distinct ?pref (count(?s) AS ?c)
where {
?pref rdf:type dbpedia-owl:Place.
?pref dbpedia-owl:wikiPageWikiLink category-ja:日本の都道府県.
?s rdf:type dbpedia-owl:Person;
dbpedia-owl:wikiPageWikiLink category-ja:日本のアイドル;
dbpedia-owl:birthPlace ?pref.
}
GROUP BY ?pref
ORDER BY ?c
SELECT AVG(?countOfWorks) AS ?avgOfWorks
WHERE {
SELECT ?author, (COUNT(?works) AS ?countOfWorks)
WHERE {
?author dbpedia-owl:notableWork ?works
}
GROUP BY ?author
}
SELECT ?director, COUNT(?director) AS ?count
WHERE {
?film dbpedia-owl:director ?director
}
GROUP BY ?director
ORDER BY DESC(?count)
SELECT ?wikiLink
WHERE {
dbpedia-ja:アメリカ合衆国 dbpedia-owl:wikiPageWikiLink ?wikiLink.
}
LIMIT 10 OFFSET 10
SELECT ?author, ?masterpiece
WHERE {
dbpedia-ja:ドラえもん prop-ja:作者 ?author.
?author prop-ja:代表作 ?masterpiece.
}
SELECT ?o
WHERE {
dbpedia-ja:日本 prop-ja:国歌 ?o.
}
以上。
Author And Source
この問題について(dbpediaの研究 その17), 我々は、より多くの情報をここで見つけました https://qiita.com/ohisama@github/items/b262b409a9da52fbf3ea著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .