, , - , SPARQL ( , , , m ;)):
- SPARQL , .
, .
LIMIT k (k = 5) 2- 5 , , n 50 ( ) 50 5 , 50/, . .
EDIT:
/ , (-) 50 ( title IRI sort)
PREFIX dbpedia-owl:<http://dbpedia.org/ontology/>
PREFIX prop:<http://dbpedia.org/property/>
SELECT ?artist ?outputAlbum
WHERE
{
{
SELECT ?artist (MAX(str(?album1)) as ?maxedAlbum)
WHERE {
?album1 prop:artist ?artist .
?album2 prop:artist ?artist .
FILTER (str(?album2) < str(?album1))
}
GROUP BY ?artist
HAVING count(?album2)<= 50
LIMIT 5
}
?outputAlbum prop:artist ?artist .
FILTER (str(?outputAlbum) < str(?maxedAlbum))
}
2: , , , - ( re "gime) dbpedia ( ). - , , - - ):
PREFIX dbpedia-owl:<http://dbpedia.org/ontology/>
PREFIX prop:<http://dbpedia.org/property/>
SELECT ?artist ?outputAlbum ?maxedCount ?inferredCrossJoinCount
WHERE
{
{
SELECT ?artist (MAX(str(?album1)) as ?maxedAlbum) (count(distinct ?album2) as ?maxedCount) (count(?album2) as ?inferredCrossJoinCount)
WHERE {
?artist rdf:type dbpedia-owl:Artist .
?album1 ?p ?artist .
?album2 ?p ?artist .
FILTER (sameTerm(?p, prop:artist))
FILTER (str(?album1) < str(?album2))
}
GROUP BY ?artist
LIMIT 5
}
?outputAlbum ?p ?artist .
FILTER (sameTerm(?p, prop:artist))
FILTER (str(?outputAlbum) < str(?maxedAlbum))
}