function disagreement_lst_summary=analyze_disagreement_lst(disagreement_lst, subject)

disagreement_lst_sort = sortrows(disagreement_lst(2:length(disagreement_lst),1:2),[1 2]);
cm=cell(1,1);
old_confusion = disagreement_lst_sort{1,1};
old_confused = disagreement_lst_sort{1,2};
confusion_cnt=1;
dontkeep=[1];
for i=2:length(disagreement_lst_sort)
    
    confusion=disagreement_lst_sort{i,1};
    confused=disagreement_lst_sort{i,2};
    if isempty(confusion)
        dontkeep=[dontkeep i-1];
    end
    
    if confusion == old_confusion
        if old_confused == confused
            confusion_cnt = confusion_cnt + 1;
            dontkeep=[dontkeep i-1];
        else
            disagreement_lst_sort{i-1,3}=confusion_cnt;
            if confusion_cnt < 5 %only keep if confusion count is >= 5
                dontkeep=[dontkeep i-1];
            end
            confusion_cnt=1;
        end
    else
        disagreement_lst_sort{i-1,3}=confusion_cnt;
        if confusion_cnt < 5 %only keep if confusion count is >= 5
            dontkeep=[dontkeep i-1];
        end
        confusion_cnt=1;
    end
    old_confusion = confusion;
    old_confused = confused;
end
dontkeep=dontkeep(1,2:length(dontkeep));
disagreement_lst_sort(dontkeep,:) = [];
disagreement_lst_summary = sortrows(disagreement_lst_sort,[-3 1]);

sname = sprintf('list_of_transcriber_disagreement_%s', subject);
oname=['tbl/',sname,'.mat']; %On linux, save the data in a file CM/sname.mat
save(oname,'disagreement_lst_summary');

%         oname=['tbl/',sname,'.xls'];
%         xlswrite(oname,prin1,1,'A1:U16');

