lib/moo_ebooks/model.rb
def consume_statuses(statuses)
      statuses.map! do |status|
        NLP.normalize(status)
      end

      text = statuses.join("\n").encode('UTF-8', invalid: :replace)

      # adds the new sentence structures into the sentence array
      #  instead of overwriting it
      mass_tikify(text).each do |sentence|
        @sentences << sentence
      end
      
      # if we're gonna keep the keyword limit at 200 and we want to preserve
      #  our old keywords array then my solution is to union the new array
      #  with the old, randomize them and take the first 200
      @keywords = @keywords.union(NLP
                                    .keywords(text)
                                    .top(200)
                                    .map(&:to_s)).sample(200)

      nil
    end
# Consume a sequence of statuses (excluding mentions)
# @param statuses [Array<String>]
Consume a sequence of statuses (excluding mentions)
Consume a sequence of statuses ( excluding mentions )
def consume_statuses(statuses)
      statuses.map! do |status|
        NLP.normalize(status)
      end
      text = statuses.join("\n").encode('UTF-8', invalid: :replace)
      mass_tikify(text).each do |sentence|
        @sentences << sentence
      end
      @keywords = @keywords.union(NLP
                                    .keywords(text)
                                    .top(200)
                                    .map(&:to_s)).sample(200)
      nil
    end
def consume_statuses ( statuses ) statuses . map! do | status | NLP . normalize ( status ) end text = statuses . join ( "\n" ) . encode ( 'UTF-8' , invalid : :replace ) mass_tikify ( text ) . each do | sentence | @sentences << sentence end @keywords = @keywords . union ( NLP . keywords ( text ) . top ( 200 ) . map ( & :to_s ) ) . sample ( 200 ) nil end
Consume a sequence of statuses (excluding mentions)
Consume a sequence of statuses ( excluding mentions )
# adds the new sentence structures into the sentence array #  instead of overwriting it # if we're gonna keep the keyword limit at 200 and we want to preserve #  our old keywords array then my solution is to union the new array #  with the old, randomize them and take the first 200
statuses
None