load title.csv;

ind = find(title(1,:));

commons = zeros(size(title,1),1);
differents = zeros(size(title,1),1);

for i = 2:size(title,1)
    tempInd = find(title(i,:));
    
    if size(tempInd,1) == 0
        commons(i) = 0;
        difference(i) = 9999999999;
    else
        for j = 1:size(tempInd,2)
            for k = 1:size(ind,2)
                if ind(k) == tempInd(j)
                    commons(i) = commons(i) + 1;
                else
                    differents(i) = differents(i) + 1;
                end
            end
        end
    end
end

indicesOf1WordsCommon = find(commons == 1);
indicesOf2WordsCommon = find(commons == 2);
indicesOf3WordsCommon = find(commons == 3);
indicesOf4WordsCommon = find(commons == 4);
