
function vector = line_to_vector(hashmap, line, vector_len)



    % if nargin<3
    %    vector_len = size(hashmap);
    % end



    num_words = length(line);
    
    
    
    vector = zeros(vector_len, 1);
    
    for i = 1:num_words
       
        word = char(line(i));
        data = hashmap.get(word);
        
        % if data == []
        if isempty(data)
            
            % error('unknown word');
            
        else      % if isempty(data)  
            
            index = data(4);

            if index ~= 0

                vector(index, 1) = 1;   

            end     % if index ~= 0
            
        end     % if isempty(data)
        
    end     % for i = 1:num_words


end
