
function [precision, hits] = eval_model(model, from_lang, to_lang, n)

    if nargin<2
        from_lang = 'est';
    end
    
    if nargin<3
        to_lang = 'eng';
    end
    
    if nargin<4
        n = 1;
    end

    
    % num_lines = rows(model.lines_eng);
    num_lines = cols(model.vectors_eng);
    
    hits = 0;
    for i = 1:num_lines
        
        found_matches = find_nearest_match(model, i, from_lang, to_lang, n);
        
        % if (found_match == i)
        %    hits = hits + 1;
        %end
        
        for j = 1:n
            
            if (found_matches(j) == i)
               
                hits = hits + 1;
                break;
                 
            end     % if (found_matches(j) == i)
            
        end     % for j = 1:n
        
    end     % for i = 1:num_lines
    

    precision = hits / num_lines;
    
    
end
