amalgame/commit
FIXED: broken instantiation after refactoring
author | Jacco van Ossenbruggen |
---|---|
Mon May 11 15:09:29 2015 +0200 | |
committer | Jacco van Ossenbruggen |
Mon May 11 15:09:29 2015 +0200 | |
commit | 8adfaf5fcb3f9c83516e592f7d113ad2c3190b2b |
tree | b22cbc2372bb4731ba1693f7b3a3ed1aa9d462a3 |
parent | da586aeb985a7594fe91891797e32823f766ef8a |
Diff style: patch stat
diff --git a/lib/amalgame/ag_stats.pl b/lib/amalgame/ag_stats.pl index 159da56..e7437bc 100644 --- a/lib/amalgame/ag_stats.pl +++ b/lib/amalgame/ag_stats.pl @@ -89,29 +89,28 @@ reference_counts_(Id, Strategy, RefStats) :- mapping_stats(URL, Mapping, Strategy, Stats) :- BasicStats = [ - totalCount-MN, - mappedSourceConcepts-SN, - mappedTargetConcepts-TN + totalCount-MN ], length(Mapping, MN), maplist(align_source, Mapping, Ss0), maplist(align_target, Mapping, Ts0), sort(Ss0, Ss), sort(Ts0, Ts), - length(Ss, SN), length(Ts, TN), - vocab_stats(URL, Strategy, SN, TN, VocStats, StructStats, CarthesianProductSize), - input_stats(URL, Strategy, SN, TN, MN, CarthesianProductSize, InputStats), + vocab_stats(URL, Strategy, Ss, Ts, VocStats, StructStats, CarthesianProductSize), + input_stats(URL, Strategy, Ss, Ts, MN, CarthesianProductSize, InputStats), append([BasicStats, VocStats, StructStats, InputStats], StatsPairs), dict_pairs(Stats,mapping_stats_dict, StatsPairs). -input_stats(URL, Strategy, SN, TN, MN, CarthesianProductSize, InputStats) :- +input_stats(URL, Strategy, Ss, Ts, MN, CarthesianProductSize, InputStats) :- InputStats = [ sourcePercentageInput-SiPerc, targetPercentageInput-TiPerc, inputPercentage-IP ], + length(Ss, SN), length(Ts, TN), + findall(Input, has_mapping_input(URL, Strategy, Input), Inputs), ( Inputs \= [] -> maplist(expand_node(Strategy), Inputs, InputMappings), @@ -134,12 +133,13 @@ input_stats(URL, Strategy, SN, TN, MN, CarthesianProductSize, InputStats) :- ). -vocab_stats(URL, Strategy, SN, TN, VocStats, StructStats, CarthesianProductSize) :- +vocab_stats(URL, Strategy, Ss, Ts, VocStats, StructStats, CarthesianProductSize) :- mapping_vocab_sources(URL, Strategy, InputS, InputT), node_stats(Strategy, InputS, StatsSin, [compute(deep)]), node_stats(Strategy, InputT, StatsTin, [compute(deep)]), option(totalCount(SourceN), StatsSin), option(totalCount(TargetN), StatsTin), + length(Ss, SN), length(Ts, TN), save_perc(SN, SourceN, SPerc), save_perc(TN, TargetN, TPerc), js_focus_node(Strategy, InputS, SvocDict), @@ -150,6 +150,8 @@ vocab_stats(URL, Strategy, SN, TN, VocStats, StructStats, CarthesianProductSize) source:SvocDict, target:TvocDict }, + mappedSourceConcepts-SN, + mappedTargetConcepts-TN, sourcePercentage-SPerc, targetPercentage-TPerc ],