def set_term_counts_and_size
      tokenize(text).each do |word|
        token = Token.new(word)
        if token.valid?
          term = token.lowercase_filter.classic_filter.to_s
          @term_counts[term] += 1
          @size += 1
        end
      end
    end
def set_term_counts_and_size
      tokenize(text).each do |word|
        token = Token.new(word)
        if token.valid?
          term = token.lowercase_filter.classic_filter.to_s
          @term_counts[term] += 1
          @size += 1
        end
      end
    end
Tokenizes the text and counts terms and total tokens.