amalgame/commit
ADDED: collect reference alignments from multiple graphs that are marked as amalgame:reference in the given Strategy
author | Jacco van Ossenbruggen |
---|---|
Tue Jul 8 18:19:54 2014 +0200 | |
committer | Jacco van Ossenbruggen |
Tue Jul 8 18:33:49 2014 +0200 | |
commit | 37a5b5db9f43601f12b6c94838525bd9905ea618 |
tree | 92f8bbca9082bace5475ec418431d730a062b858 |
parent | e4c309537df42f83392c4fc1b77063e258ccdc12 |
Diff style: patch stat
diff --git a/lib/amalgame/ag_reference.pl b/lib/amalgame/ag_reference.pl new file mode 100644 index 0000000..c184262 --- /dev/null +++ b/lib/amalgame/ag_reference.pl @@ -0,0 +1,18 @@ +:- module(ag_reference, + [ reference_mappings/2 + ]). + +:- use_module(library(apply)). +:- use_module(library(lists)). +:- use_module(library(semweb/rdf_db)). +:- use_module(library(amalgame/expand_graph)). + +%% reference_mappings(+Strategy, -References) is det. +% +% Reference contains all reference (ground truth) correspondences +% for Strategy or the empty list if no refs are available. + +reference_mappings(Strategy, References) :- + findall(R, rdf(R, amalgame:status, amalgame:reference, Strategy), RefGraphs), + maplist(expand_node(Strategy), RefGraphs, MappingLists), + append(MappingLists, References).