code: def word=(word)
        add_weight :count, :letter, word.length
        add_weight :first, :letter, word[0]
        (word.length - 1).times { |l| add_weight :next, word[l], word[l.succ] }
        add_weight :last, word[-2], word[-1]
      end
docs: Analyze word
  
   Adds weights for first, next and last letters and letter count
  
   @param [String] word