Skip to content

Commit

Permalink
Minor query formatting and add back in lexeme ID
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Mar 30, 2024
1 parent 2fd563a commit e3970f4
Showing 1 changed file with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
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 DISTINCT
?lexeme
?noun
WHERE {
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") as ?lexemeID)
?noun

WHERE {
# Nouns and pronouns.
VALUES ?nounTypes { wd:Q1084 wd:Q147276 }
?lexeme a ontolex:LexicalEntry ;
dct:language wd:Q5287 ;
wikibase:lexicalCategory ?nounType ;
wikibase:lemma ?noun .
FILTER(?nounType = ?nounTypes)

BIND(lang(?noun) as ?language)
FILTER(CONTAINS(?language, "ja-hira") || CONTAINS(?language, "ja"))
FILTER (?nounType = ?nounTypes)

BIND (lang(?noun) as ?language)

FILTER (
CONTAINS(?language, "ja-hira") || CONTAINS(?language, "ja")
)
}

0 comments on commit e3970f4

Please sign in to comment.