AKSW/SPARQL2NL

redundant phrases

Closed this issue · 0 comments

SPARQL endpoint: http://data.linkedmdb.org/sparql

SPARQL Query:

SELECT DISTINCT ?actorName
WHERE
{ ?dir1 http://data.linkedmdb.org/resource/movie/director_name "John Waters" .
?dir2 http://data.linkedmdb.org/resource/movie/director_name "Steven Spielberg" .
?dir1movie http://data.linkedmdb.org/resource/movie/director ?dir1 .
?dir1movie http://data.linkedmdb.org/resource/movie/actor ?actor .
?dir2movie http://data.linkedmdb.org/resource/movie/actor ?actor .
?dir2movie http://data.linkedmdb.org/resource/movie/director ?dir2 .
?actor http://data.linkedmdb.org/resource/movie/actor_name ?actorName
}

Output:

This query retrieves distinct entities ?actorName such that ?dir1's director_name is John Waters, ?dir2's director_name is Steven Spielberg, ?dir1movie's director is ?dir1, ?dir1movie's actor is ?actor, ?dir2movie's actor is ?actor, ?dir2movie's director is ?dir2 and ?actor's actor_name is ?actorName.

After postprocessing:
This query retrieves distinct entities ?actorName such that some actorName is the actor_name of ?dir2movie's directormovie's actor and ?dir1movie's directormovie's actor, ?actorName is the actor_name of ?dir2movie's directormovie's actor and ?dir1movie's directormovie's actor, ?actorName is the actor_name of ?dir2movie's directormovie's actor and ?dir1movie's directormovie's actor, this ?dir1movie's directormovie's director's director_name is John Waters, this ?dir2movie's directormovie's director's director_name is Steven Spielberg, ?actorName is the actor_name of ?dir2movie's directormovie's actor and ?dir1movie's directormovie's actor, ?actorName is the actor_name of ?dir2movie's directormovie's actor and ?dir1movie's directormovie's actor, this ?dir1movie's directormovie's director's director_name is John Waters and this ?dir2movie's directormovie's director's director_name is Steven Spielberg.

There is also a term "directormovie", which is not a label of any resource.