<commit_before>require 'mongo'

module OpenBEL
  module Evidence
    module Facets

      def evidence_facets(query_hash = nil)
        pipeline =
          if query_hash.is_a?(Hash) && !query_hash.empty?
            pipeline = [{'$match': query_hash}] + AGGREGATION_PIPELINE
          else
            AGGREGATION_PIPELINE
          end
        @collection.aggregate(pipeline)
      end

      private

      AGGREGATION_PIPELINE = [<commit_msg>fix hash syntax for 1.9.3; refs #54<commit_after>require 'mongo'

module OpenBEL
  module Evidence
    module Facets

      def evidence_facets(query_hash = nil)
        pipeline =
          if query_hash.is_a?(Hash) && !query_hash.empty?
            pipeline = [{:'$match' => query_hash}] + AGGREGATION_PIPELINE
          else
            AGGREGATION_PIPELINE
          end
        @collection.aggregate(pipeline)
      end

      private

      AGGREGATION_PIPELINE = [
{'fraction_non_alphanumeric': 0.0806979280261723, 'fraction_numerical': 0.0054525627044711015, 'mean_word_length': 2.1875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6874085', 'n_tokens_mistral': 292, 'n_tokens_neox': 292, 'n_words': 58}