From 42fd8f967d66250681960c6ffddd0268b8a95390 Mon Sep 17 00:00:00 2001
From: takayamaki / fusagiko <24884114+takayamaki@users.noreply.github.com>
Date: Thu, 4 Jul 2024 10:50:50 +0900
Subject: [PATCH] =?UTF-8?q?rdflint=E3=81=AE=E5=A7=93=E5=90=8D=E6=95=B4?=
=?UTF-8?q?=E5=90=88=E3=83=AB=E3=83=BC=E3=83=AB=E3=82=92additionalName?=
=?UTF-8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=81=AB=E4=BC=B4=E3=81=84=E5=A4=89?=
=?UTF-8?q?=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.rdflint/rdflint-config.yml | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/.rdflint/rdflint-config.yml b/.rdflint/rdflint-config.yml
index 01568558..b2519339 100644
--- a/.rdflint/rdflint-config.yml
+++ b/.rdflint/rdflint-config.yml
@@ -5,12 +5,12 @@ rules:
query: |
PREFIX schema:
PREFIX imas:
- SELECT ?s ?fn ?gn ?nm ?fnk ?gnk ?nmk
+ SELECT ?s ?fn ?gn ?an ?nm ?fnk ?gnk ?ank ?nmk
WHERE {
- ?s schema:familyName ?fn; schema:givenName ?gn; schema:name ?nm;
- imas:familyNameKana ?fnk; imas:givenNameKana ?gnk; imas:nameKana ?nmk.
- FILTER(LANG(?fn) = 'ja' && LANG(?gn) = 'ja' && LANG(?nm) = 'ja'
- && LANG(?fnk) = 'ja' && LANG(?gnk) = 'ja' && LANG(?nmk) = 'ja')
+ ?s schema:familyName ?fn; schema:givenName ?gn; schema:additionalName ?an; schema:name ?nm;
+ imas:familyNameKana ?fnk; imas:givenNameKana ?gnk; imas:additionalNameKana ?ank; imas:nameKana ?nmk.
+ FILTER(LANG(?fn) = 'ja' && LANG(?gn) = 'ja' && LANG(?an) = 'ja' && LANG(?nm) = 'ja'
+ && LANG(?fnk) = 'ja' && LANG(?gnk) = 'ja' && LANG(?ank) = 'ja' && LANG(?nmk) = 'ja')
}
valid: |
while(rs.hasNext()) {
@@ -18,6 +18,7 @@ rules:
jn = [r.getLiteral("fn").value + r.getLiteral("gn").value,
r.getLiteral("gn").value + r.getLiteral("fn").value,
r.getLiteral("fn").value + "・" + r.getLiteral("gn").value,
+ r.getLiteral("gn").value + "・" + r.getLiteral("an").value + "・" + r.getLiteral("fn").value,
r.getLiteral("gn").value + "・" + r.getLiteral("fn").value]
nm = r.getLiteral("nm").value
if (!(nm in jn)) {
@@ -27,6 +28,7 @@ rules:
jnk = [r.getLiteral("fnk").value + r.getLiteral("gnk").value,
r.getLiteral("gnk").value + r.getLiteral("fnk").value,
r.getLiteral("fnk").value + "・" + r.getLiteral("gnk").value,
+ r.getLiteral("gnk").value + "・" + r.getLiteral("ank").value + "・" + r.getLiteral("fnk").value,
r.getLiteral("gnk").value + "・" + r.getLiteral("fnk").value]
nmk = r.getLiteral("nmk").value
if (!(nmk in jnk)) {
@@ -37,15 +39,16 @@ rules:
target: "RDFs/.*"
query: |
PREFIX schema:
- SELECT ?s ?fn ?gn ?nm
+ SELECT ?s ?fn ?gn ?an ?nm
WHERE {
- ?s schema:familyName ?fn; schema:givenName ?gn; schema:name ?nm
- FILTER(LANG(?fn) = 'en' && LANG(?gn) = 'en' && LANG(?nm) = 'en')
+ ?s schema:familyName ?fn; schema:givenName ?gn; schema:additionalName ?an; schema:name ?nm
+ FILTER(LANG(?fn) = 'en' && LANG(?gn) = 'en' && LANG(?an) = 'en' && LANG(?nm) = 'en')
}
valid: |
while(rs.hasNext()) {
r = rs.next()
jn = [r.getLiteral("fn").value + " " + r.getLiteral("gn").value,
+ r.getLiteral("gn").value + " " + r.getLiteral("an").value + " " + r.getLiteral("fn").value,
r.getLiteral("gn").value + " " + r.getLiteral("fn").value]
nm = r.getLiteral("nm").value
if (!(nm in jn)) {