Skip to content

Commit

Permalink
Updated query_nouns.sparql
Browse files Browse the repository at this point in the history
Changed the query so that it filters for kanji, hiragana and katakana.
  • Loading branch information
henrikth93 committed Mar 23, 2024
1 parent 76790fb commit 7834acc
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX dct: <http://purl.org/dc/terms/>
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 DISTINCT
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") as ?lexemeID)
?noun
SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") as ?lexemeID) ?noun WHERE {

WHERE {
# Nouns and pronouns.
VALUES ?nounTypes { wd:Q1084 wd:Q147276 }
?lexeme a ontolex:LexicalEntry ;
Expand All @@ -15,6 +16,5 @@ WHERE {
FILTER(?nounType = ?nounTypes)

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

0 comments on commit 7834acc

Please sign in to comment.