amalgame/commit
EXP: preloaded alignments
author | Jacco van Ossenbruggen |
---|---|
Wed Jun 17 16:03:58 2015 +0200 | |
committer | Jacco van Ossenbruggen |
Wed Jun 17 16:03:58 2015 +0200 | |
commit | 73db1ec6db4254d8a957356236c6d7ca5f8ce189 |
tree | 9f1917d580cb7b5c36cb27929a9af464753c6234 |
parent | c5447b2e16a06055c63946e9d901e0c7595849f1 |
Diff style: patch stat
diff --git a/lib/amalgame/map.pl b/lib/amalgame/map.pl index 6b8050a..6eccba7 100644 --- a/lib/amalgame/map.pl +++ b/lib/amalgame/map.pl @@ -36,6 +36,9 @@ align(Source,Target,EvidenceList) terms. @license LGPL */ +:- use_module(library(lists)). +:- use_module(library(option)). + :- use_module(library(semweb/rdf_db)). :- use_module(library(semweb/rdfs)). @@ -115,7 +118,9 @@ has_correspondence(align(E1, E2, P), Graph) :- ), ( memberchk(method(_), Pflat) -> P = Properties1 - ; P = [[method(preloaded), graph(Graph)]|Properties1] + ; Properties1 = [P1|Rest], + append([method(preloaded), graph(Graph)], P1, P2), + P = [P2|Rest] ). has_correspondence_chk(align(E1,E2,_P), Graph):- @@ -183,9 +188,12 @@ has_map([E1, E2], edoal, Properties, Graph) :- has_edoal_map_([E1, E2], Cell, Graph), findall(Bnode, rdf(Cell, amalgame:evidence, Bnode, Graph), Bnodes), findall(Prov, - ( member(Bnode, Bnodes), + ( member(Bnode, [Cell|Bnodes]), findall(Term, ( rdf(Bnode, Prop, Value, Graph), + \+ rdf_equal(align:entity1, Prop), + \+ rdf_equal(align:entity2, Prop), + \+ rdf_equal(rdf:type, Prop), prop_to_term(Prop, Value, Term) ), Prov)