<commit_before>module Chatterbot

  #
  # handle Twitter searches
  module Search

    #
    # modify a query string to exclude retweets from searches
    #
    def exclude_retweets(q)
      q.include?("include:retweets") ? q : q += " -include:retweets"
    end
    
    # internal search code
    def search(queries, opts = {}, &block)
      debug "check for tweets since #{since_id}"

      if queries.is_a?(String)
        queries = [queries]
      end

      
      #
      # search twitter
      #
      queries.each { |query|
        debug "search: #{query} #{default_opts.merge(opts)}"
        result = client.search(
                                      exclude_retweets(query),
                                      default_opts.merge(opts)
                                      )
        update_since_id(result)

        @current_tweet = nil
        result.each { |s|<commit_msg>disable exclude_retweets for the moment -- this is a breaking change<commit_after>module Chatterbot

  #
  # handle Twitter searches
  module Search

    #
    # modify a query string to exclude retweets from searches
    #
    def exclude_retweets(q)
      q
      #q.include?("include:retweets") ? q : q += " -include:retweets"
    end
    
    # internal search code
    def search(queries, opts = {}, &block)
      debug "check for tweets since #{since_id}"

      if queries.is_a?(String)
        queries = [queries]
      end

      
      #
      # search twitter
      #
      queries.each { |query|
        debug "search: #{query} #{default_opts.merge(opts)}"
        result = client.search(
                                      exclude_retweets(query),
                                      default_opts.merge(opts)
                                      )
        update_since_id(result)

        @current_tweet = nil
        result.each { |s|
{'fraction_non_alphanumeric': 0.09164859002169197, 'fraction_numerical': 0.0, 'mean_word_length': 1.584033613445378, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2193191', 'n_tokens_mistral': 533, 'n_tokens_neox': 513, 'n_words': 125}