Skip to content

Commit

Permalink
Formatted SPARQL query
Browse files Browse the repository at this point in the history
Formatted SPARQL query so that it looks nicer.
  • Loading branch information
henrikth93 committed Mar 30, 2024
1 parent 7834acc commit 2fd563a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
PREFIX wikibase: <http://wikiba.se/ontology#>

PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX wd: <http://www.wikidata.org/entity/>
# All Japanese (Q5287) nouns.
# Enter this query at https://query.wikidata.org/.

SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") as ?lexemeID) ?noun WHERE {

SELECT DISTINCT
?lexeme
?noun

WHERE {
# Nouns and pronouns.
VALUES ?nounTypes { wd:Q1084 wd:Q147276 }
?lexeme a ontolex:LexicalEntry ;
Expand All @@ -16,5 +22,5 @@ SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") as ?lexemeI
FILTER(?nounType = ?nounTypes)

BIND(lang(?noun) as ?language)
FILTER(CONTAINS(?language, "ja-hira") || CONTAINS(?language, "ja") || CONTAINS(?language, "ja-kana"))
FILTER(CONTAINS(?language, "ja-hira") || CONTAINS(?language, "ja"))
}

0 comments on commit 2fd563a

Please sign in to comment.