amalgame/commit

REFACT: phase out voc_property

authorJacco van Ossenbruggen
Mon Sep 15 09:17:32 2014 +0200
committerJacco van Ossenbruggen
Mon Sep 15 09:17:32 2014 +0200
commit8172fd7d500484acba2c63af505a5279b8f44dd4
tree744b159174c5bd84693427742122edf0209ff5b7
parentcfef4d102c9b3bb8ee6c1424cbbf883df34b2305
Diff style: patch stat
diff --git a/applications/builder.pl b/applications/builder.pl
index f9f8b5b..b9d4213 100644
--- a/applications/builder.pl
+++ b/applications/builder.pl
@@ -1,6 +1,7 @@
 :- module(ag_builder, []).
 
 :- use_module(library(pairs)).
+:- use_module(library(option)).
 :- use_module(library(settings)).
 
 :- use_module(library(http/http_dispatch)).
@@ -12,7 +13,7 @@
 :- use_module(user(user_db)).
 
 :- use_module(library(amalgame/ag_strategy)).
-:- use_module(library(amalgame/voc_stats)).
+:- use_module(library(amalgame/ag_stats)).
 :- use_module(library(amalgame/util)).
 :- use_module(library(amalgame/json_util)).
 :- use_module(library(amalgame/expand_graph)).
@@ -80,7 +81,8 @@ precalc_voc_stats(Strategy) :-
 	% handy to know how many concepts etc are in each vocab,
 	% both for the user as for the hints system etc.
 	forall(strategy_vocabulary(Strategy, Vocab),
-	       (   voc_property(Vocab, totalCount(_))
+	       (   node_stats(Strategy, Vocab, Stats, [compute(false)]),
+		   option(totalCount(_), Stats)
 	       ->  ( setting(amalgame:precompute, true)
 		   ->  precompute_node(Strategy, Vocab)
 		   ;   true