-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy path7-recommended_movies.sparql
48 lines (45 loc) · 1.5 KB
/
7-recommended_movies.sparql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
prefix : <http://schema.org/>
prefix t: <http://www.imdb.com/title/>
prefix spa: <tag:stardog:api:analytics:>
SELECT ?recommendation ?confidence
WHERE {
graph spa:model {
:c1 spa:arguments (?actors ?writers ?directors ?genres ?producers ?keywords ?languages ?contentRating ?year ?metaCritic ?rating) ;
spa:confidence ?confidence ;
spa:predict ?recommendation .
}
{
SELECT
(spa:set(?actor) as ?actors)
(spa:set(?writer) as ?writers)
(spa:set(?director) as ?directors)
(spa:set(?genre) as ?genres)
(spa:set(?producer) as ?producers)
(spa:set(?keyword) as ?keywords)
(spa:set(?language) as ?languages)
?contentRating
?year
?metaCritic
?storyline
?rating
?movie
{
?movie :rating ?rating ;
:actor ?actor ;
:author ?writer ;
:director ?director ;
:genre ?genre ;
:contentRating ?contentRating ;
:copyrightYear ?year ;
:productionCompany ?producer ;
:keyword ?keyword ;
:language ?language ;
:storyline ?storyline ;
:metaCritic ?metaCritic .
FILTER(?movie in (t:tt0118715)) # The Big Lebowski
}
GROUP BY ?movie ?year ?contentRating ?metaCritic ?storyline ?rating
}
}
ORDER BY DESC(?confidence)
LIMIT 5