Created
March 27, 2022 14:53
-
-
Save fvh-P/e4cbb1325cd8d9c22060357f63d227bb to your computer and use it in GitHub Desktop.
正式名称のかな表記が6文字のリリィ・教導官・その他キャラクター、または正式名称が6文字のレギオン・CHARMを取得するSPARQLクエリ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX lily: <https://lily.fvhp.net/rdf/IRIs/lily_schema.ttl#> | |
PREFIX schema: <http://schema.org/> | |
SELECT ?kana ?display ?class ?slug | |
WHERE { | |
{ | |
VALUES ?class { lily:Lily lily:Teacher lily:Character } | |
?slug lily:nameKana ?kana ; | |
schema:name ?display ; | |
a ?class. | |
FILTER(strlen(?kana)=6) | |
FILTER(lang(?display)="ja") | |
} | |
UNION | |
{ | |
VALUES ?class { lily:Legion lily:Charm } | |
?slug schema:name ?display ; | |
a ?class. | |
FILTER(strlen(?display)=6) | |
FILTER(lang(?display)="ja") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
変数
?class
と?slug
は Lemonade の URL 生成用。変数
?nameKana
が存在しない場合、変数?display
から利用者側で漢字表記などのものを除去・ひらがなへの変換が必要。