aboutsummaryrefslogtreecommitdiff
path: root/transform
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-08-28 16:00:16 +0300
committerMunyoki Kilyungi2023-08-28 16:00:16 +0300
commitf3ede362e1d7d00022a6f9f74d7ca304014f07fe (patch)
treebfa89e642378090d3b1411f50c0aeabfa74d260a /transform
parent24226aeafadfeb81a01ae6105f078dd319965887 (diff)
downloadgn-transform-databases-f3ede362e1d7d00022a6f9f74d7ca304014f07fe.tar.gz
Set string->identifier to defaut to "" sep and string-capitalize
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'transform')
-rw-r--r--transform/triples.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/transform/triples.scm b/transform/triples.scm
index 926b8a2..9775d36 100644
--- a/transform/triples.scm
+++ b/transform/triples.scm
@@ -23,11 +23,12 @@
(string->symbol
(format #f "~s~a" string-field schema)))))
-(define* (string->identifier prefix str
- #:optional #:key
- (ontology "gn:")
- (separator "_")
- (proc string-downcase))
+(define* (string->identifier
+ prefix str
+ #:optional #:key
+ (ontology "gn:")
+ (separator "")
+ (proc string-capitalize-first))
"Convert STR to a turtle identifier after replacing illegal
characters with an underscore and prefixing with gn:PREFIX."
(if (or (and (string? str) (string-null? str))