I am pretty new to SPARQL, and I am trying to query Japanese verbs and their different conjugations.
I am not getting any results for the optional ?pastTense
, and I can not grasp why.
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") as ?lexemeID) ?verb ?pastTense WHERE {
?lexeme a ontolex:LexicalEntry ;
dct:language wd:Q5287 ;
wikibase:lexicalCategory wd:Q24905 ;
wikibase:lemma ?verb .
OPTIONAL {
?lexeme ontolex:lexicalForm ?pastTenseForm .
?pastTenseForm ontolex:representation ?pastTense ;
wikibase:grammaticalFeature wd:Q106782068 ;
}
BIND(lang(?verb) as ?language)
FILTER(CONTAINS(?language, "ja-hira") || CONTAINS(?language, "ja"))
OPTIONAL {
}
}