Simple approach to creating ngrams in Ruby