Skip to content

Instantly share code, notes, and snippets.

@nandana
Created July 29, 2015 18:10
Show Gist options
  • Save nandana/a929fb643c0d89715578 to your computer and use it in GitHub Desktop.
Save nandana/a929fb643c0d89715578 to your computer and use it in GitHub Desktop.
Dbnary Spanish Synonym (http://kaiko.getalp.org/sparql)
PREFIX lemon: <http://www.lemon-model.net/lemon#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX lexvo: <http://lexvo.org/id/iso639-3/>
PREFIX dbnary: <http://kaiko.getalp.org/dbnary#>
select distinct ?word (count (distinct ?synonym) as ?synonymCount)
(group_concat(distinct ?synonym;separator="; ") as ?synonyms) where {
?lexicalEntry a lemon:LexicalEntry;
dbnary:synonym ?synonym .
?word dbnary:refersTo ?lexicalEntry .
{ ?lexicalEntry dcterms:language lexvo:spa }
UNION { ?lexicalEntry lemon:language "es" } .
}
GROUP BY ?word
ORDER BY DESC(?synonymCount)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment