%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load in build-in libraries
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:-use_module(library(lists)).
:-use_module(library(terms)).
:-use_module(library(ordsets)).
:-use_module(library(rbtrees)).
:-use_module(library(avl)).
:-use_module(library(random)).
:-use_module(library(apply_macros)).
:-use_module(library(timeout)).



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HotLog (Higher-order TopLog)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:-['test/cross_validation.pl'].
:-['test/score.pl'].
:-['test/utilities.pl'].


:-['test/earley_parser_NLP.pl'].


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Data set
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/******************* Settings for Evaluation ********************/

% [9,20,22,28,26,8,43,48,27,7,25,23,30,2,34,24,46,12,4,39,6,14,41,35,16,29,19,36,45,1,3,50,37,47,32,17,5,21,31,38,15,40,49,13,18,33,42,44,11,10]
fold(1,[9,20,22,28,26]).
fold(2,[8,43,48,27,7]).
fold(3,[25,23,30,2,34]).
fold(4,[24,46,12,4,39]).
fold(5,[6,14,41,35,16]).
fold(6,[29,19,36,45,1]).
fold(7,[3,50,37,47,32]).
fold(8,[17,5,21,31,38]).
fold(9,[15,40,49,13,18]).
fold(10,[33,42,44,11,10]).


set(evDepth,EI,DepthLimit):-
	ex(EI,parse(Seq),PosNegSign),	
	length(Seq,DepthLimit0),DepthLimit is DepthLimit0+30.



:-['ex.pl'].	%fixed examples
:-[hypothesis].


% use for pa.script
:-	yap_flag(argv,[X,FoldIndex0]),
	atom_number(FoldIndex0,FoldIndex),
	fold(FoldIndex,TestEIs),write(TestEIs),nl,
	test(TestEIs,PA),
	tell('oneAccuracy.txt'),
	write(PA),write(' '),
	told.



