data_dir = [pwd filesep 'validation' filesep];

%% Load the list of records in the validation set.
fid = fopen([data_dir 'RECORDS'],'r');
if(fid ~= -1)
    RECLIST = textscan(fid,'%s');
else
    error(['Could not open ' data_dir 'RECORDS for scoring. Exiting...'])
end
fclose(fid);
RECORDS = RECLIST{1};

%% Running on the validation set and obtain the score results
classifyResult = zeros(length(RECORDS),1);
total_time     = 0;

for i = 1:length(RECORDS)
    fname = RECORDS{i};
    tic;
    
%Create annotation file
    wqrs(fname);

    total_time = total_time+toc;
    fprintf(['---Processed ' num2str(i) ' out of ' num2str(length(RECORDS)) ' records.\n'])
end
fclose(fid);


%Create annotation file
try
    wqrs(recordName);
catch
    diplay('fail');
end
    