lib/twitter_ebooks/model.rb in twitter_ebooks-3.1.5 vs lib/twitter_ebooks/model.rb in twitter_ebooks-3.1.6

- old
+ new

@@ -181,11 +181,11 @@ text = statements.join("\n").encode('UTF-8', :invalid => :replace) mention_text = mentions.join("\n").encode('UTF-8', :invalid => :replace) lines = nil; statements = nil; mentions = nil # Allow garbage collection - log "Tokenizing #{text.count('\n')} statements and #{mention_text.count('\n')} mentions" + log "Tokenizing #{text.count("\n")} statements and #{mention_text.count("\n")} mentions" @sentences = mass_tikify(text) @mentions = mass_tikify(mention_text) log "Ranking keywords" @@ -252,18 +252,18 @@ retries = 0 tweet = "" while (tikis = generator.generate(3, :bigrams)) do - log "Attempting to produce tweet try #{retries+1}/#{retry_limit}" + #log "Attempting to produce tweet try #{retries+1}/#{retry_limit}" break if (tikis.length > 3 || responding) && valid_tweet?(tikis, limit) retries += 1 break if retries >= retry_limit end if verbatim?(tikis) && tikis.length > 3 # We made a verbatim tweet by accident - log "Attempting to produce unigram tweet try #{retries+1}/#{retry_limit}" + #log "Attempting to produce unigram tweet try #{retries+1}/#{retry_limit}" while (tikis = generator.generate(3, :unigrams)) do break if valid_tweet?(tikis, limit) && !verbatim?(tikis) retries += 1 break if retries >= retry_limit