Skip to content

Commit

Permalink
Merge pull request #30 from ontodev/blank-node-bug-fix
Browse files Browse the repository at this point in the history
Fix duplicated values (fixes #28)
  • Loading branch information
ckindermann authored Nov 19, 2024
2 parents 692cab3 + f039757 commit 2b515f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ldtab/thin2thick.clj
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@
"Given a set of thin triples,
return a map from subjects to thin triples."
[thin-triples]
(group-by (fn [^Triple x] (.getSubject x)) thin-triples))
(let [grouping (group-by (fn [^Triple x] (.getSubject x)) thin-triples)
dedup (map-on-hash-map-vals distinct grouping)]
dedup))

(defn thin-2-thick-triple-raw
"Given a root thin triple t (see function root-triples) and a map from subjects to thin triples in an RDF graph G,
Expand Down

0 comments on commit 2b515f6

Please sign in to comment.