Skip to content

Commit

Permalink
use curie->properties to get curie name to avoid dict-get failed error
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwenho committed Aug 23, 2024
1 parent 288f801 commit ac11e61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrib/medikanren2/neo/utils.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
(get-descendent-curies*-in-db
(curies->synonyms-in-db curie-list)))

(define (concept->name curie)
#;(define (concept->name curie)
(let ((id-name-val
(remove-duplicates (filter (lambda (cl)
(and (equal? (car cl) curie)
Expand All @@ -55,6 +55,10 @@
curie
(caddar id-name-val))))

(define (concept->name curie)
(let ((name (assoc "name" (curie->properties curie))))
(if name (cdr name) curie)))

(define (concept->category curie)
(let ((category (assoc "category" (curie->properties curie))))
(if category (cdr category) '())))
Expand Down

0 comments on commit ac11e61

Please sign in to comment.