lib/twitter_ebooks/model.rb
# Convert a body of text into arrays of tikis
# @param text [String]
# @return [Array<Array<Integer>>]
Convert a body of text into arrays of tikis
Convert a body of text into arrays of tikis
def mass_tikify(text)
      sentences = NLP.sentences(text)
      sentences.map do |s|
        tokens = NLP.tokenize(s).reject do |t|
          t.include?('@') || t.include?('http')
        end
        tokens.map { |t| tikify(t) }
      end
    end
def mass_tikify ( text ) sentences = NLP . sentences ( text ) sentences . map do | s | tokens = NLP . tokenize ( s ) . reject do | t | t . include? ( '@' ) || t . include? ( 'http' ) end tokens . map { | t | tikify ( t ) } end end
Convert a body of text into arrays of tikis
Convert a body of text into arrays of tikis
# Don't include usernames/urls as tokens
None
Array<Array<Integer>>
text
None