From e0f8db100d5c36e304565481e8bb99dd40f55149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Lamercerie?= <aurelien.lamercerie@tetras-libre.fr> Date: Tue, 8 Mar 2022 23:05:00 +0100 Subject: [PATCH] Fix id/concepts for labels without brackets --- config/transduction-schemes.ttl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/transduction-schemes.ttl b/config/transduction-schemes.ttl index f6722db2..e885fdc3 100644 --- a/config/transduction-schemes.ttl +++ b/config/transduction-schemes.ttl @@ -732,7 +732,7 @@ WHERE { FILTER ( regex(str(?uw1Label),str(?restriction)) ). # Label: Id, concept ?uw1 unl:has_id ?uw1Id. - BIND (strbefore(?uw1Label, '(') AS ?concept1). + BIND (IF (CONTAINS(?uw1Label, '('), strbefore(?uw1Label, '('), str(?uw1Label)) AS ?concept1). # URI (for Atom Object) cprm:Config_Parameters cprm:netURI ?netURI. cprm:Config_Parameters cprm:objectRef ?objectRef. @@ -889,7 +889,7 @@ WHERE { # Label(s) / URI ?req unl:has_id ?reqId. ?uw1 rdfs:label ?uw1Label. - BIND (strbefore(?uw1Label, '(') AS ?concept1). + BIND (IF (CONTAINS(?uw1Label, '('), strbefore(?uw1Label, '('), str(?uw1Label)) AS ?concept1). BIND (strafter(str(?uw1), \"---\") AS ?numOcc). BIND (concat( ?reqId, '_', ?concept1, ?numOcc) AS ?uwId). } """ ; -- GitLab