lib/text_statistics.rb
def add(word,categories)
      categories.each do |category|
        @cwords[category] = [] if @cwords[category].nil?
        @cwords[category].push word
        @scores[category] += 1
      end
      @words.push word
      @word_count += 1
    end
def add(word,categories)
      categories.each do |category|
        @cwords[category] = [] if @cwords[category].nil?
        @cwords[category].push word
        @scores[category] += 1
      end
      @words.push word
      @word_count += 1
    end
Adds word and its category to stats.