def make_vector(string, ensure_tokens_in_vocab = false)
      @vector_cache = {}
      @vector_cache[string] ||= begin
        arr = Array.new(vector_token_index.size, 0)
        
        tokens = tokenize(string)
        tokens &= @vocab if ensure_tokens_in_vocab
        tokens.uniq.each do |token| 
          index = vector_token_index[token]
          arr[index] = tf_idf(token, tokens, @documents)
        end
      
        Vector.elements(arr, false)
      end
    end
def make_vector(string, ensure_tokens_in_vocab = false)
      @vector_cache = {}
      @vector_cache[string] ||= begin
        arr = Array.new(vector_token_index.size, 0)
        
        tokens = tokenize(string)
        tokens &= @vocab if ensure_tokens_in_vocab
        tokens.uniq.each do |token| 
          index = vector_token_index[token]
          arr[index] = tf_idf(token, tokens, @documents)
        end
      
        Vector.elements(arr, false)
      end
    end
NOTE: will choke if string contains tokens not in vocab
       this is why, when we make the query vector, we do an
       intersection of tokens with the vocab