yaz/commit
remove dependency
author | Michiel Hildebrand |
---|---|
Thu Feb 10 10:23:27 2011 +0100 | |
committer | Michiel Hildebrand |
Thu Feb 10 10:23:27 2011 +0100 | |
commit | 99274d88caa655b8d9660b4ed0353fc211180d2c |
tree | 1291315fac690977858b1430ac6cb867bcdd2ac0 |
parent | 7f7ad52d68a7fd8ef47eaa5a234e2f8d461ce3fa |
Diff style: patch stat
diff --git a/applications/yaz_cgarden.pl b/applications/yaz_cgarden.pl index 452c684..d2a0a68 100644 --- a/applications/yaz_cgarden.pl +++ b/applications/yaz_cgarden.pl @@ -86,7 +86,7 @@ link_tags_to_concepts([], _, []). link_tags_to_concepts([A0|As], Ps, [A|Rest]) :- A0 = annotation(literal(Tag),Start,End,Entries), A = annotation(literal(Tag),Start,End,Entries,Score,Concepts), - yaz_mgarden:tag_score(Entries, Score), + tag_score(Entries, Score), ( reconcile(Tag, 3, [], Ps, Hits) -> maplist(hit_concept, Hits, Concepts) ; Concepts = [] @@ -94,6 +94,13 @@ link_tags_to_concepts([A0|As], Ps, [A|Rest]) :- maplist(hit_concept, Hits, Concepts), link_tags_to_concepts(As, Ps, Rest). +tag_score(Entries, Score) :- + findall(S, (member(i(E,_), Entries), + rdf(E, pprime:score, literal(S)) + ), + Ss), + sumlist(Ss, Score). + hit_concept(hit(_,URI,_,Label), concept(URI,Label,Alt,Desc)) :- ( rdf_has(URI, rdfs:label, Lit), literal_text(Lit, Alt),