diff options
| author | Munyoki Kilyungi | 2025-12-23 20:07:02 +0300 |
|---|---|---|
| committer | Munyoki Kilyungi | 2026-01-13 12:02:50 +0300 |
| commit | c0426669eb398c0e9dd773dc908c8ba544f6b3c0 (patch) | |
| tree | 5b7d7cb87d07abc0c36f4f899a66cc2b0852ae8e /transform | |
| parent | 5fec5c4d6d1c07251b06348a00bb040978b5e9ac (diff) | |
| download | gn-transform-databases-c0426669eb398c0e9dd773dc908c8ba544f6b3c0.tar.gz | |
Have an ID function as the default func for string->identifier.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'transform')
| -rw-r--r-- | transform/triples.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/transform/triples.scm b/transform/triples.scm index 55edf8a..e24e68e 100644 --- a/transform/triples.scm +++ b/transform/triples.scm @@ -35,15 +35,15 @@ (format #f "~s~a" string-field schema))))) (define* (string->identifier - prefix str - #:optional #:key - (ontology "gn:") - (separator "") - (proc string-capitalize-first)) + prefix str + #:optional #:key + (ontology "gn:") + (separator "") + (proc (lambda (x) x))) "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)) - (eq? str #f)) + (eq? str #f)) "" (string->symbol (string-append ontology prefix separator |
