<commit_before>module Yesmail2
  class ReferenceData < ApiBase
    def self.api_path
      'reference-data'
    end

    def self.summary
      # GET reference-data
      get(full_path, {})
    end

    def self.dataset_summary(dataset_name)
      # GET reference-data/{dataset}
      get(full_path(dataset_name), :params => {})
    end

    def self.records(dataset_name, options = {})
      # GET reference-data/{dataset}/records
      get(full_path(dataset_name, 'records'), :params => options)<commit_msg>Adding some comments<commit_after>module Yesmail2
  class ReferenceData < ApiBase
    def self.api_path
      'reference-data'
    end

    # Returns a list of datasets in the form:
    # {"datasetCount"=>3,
    #   "datasets"=>
    #    [{"name"=>"DATASET1", "recordCount"=>3160313},
    #     {"name"=>"DATASET2", "recordCount"=>8023825},
    #     {"name"=>"DATASET3", "recordCount"=>7341190}]}
    def self.summary
      # GET reference-data
      get(full_path, {})
    end

    # @param dataset_name [String] the name of a dataset as
    # returned by ::sumary
    def self.dataset_summary(dataset_name)
      # GET reference-data/{dataset}
      get(full_path(dataset_name), :params => {})
    end

    # Query for data in the reference table
    # @param dataset_name [String] the name of a dataset as
    # returned by ::sumary
    # @option limit [Integer] a limit of the number of records to return
    # @option offset [Integer] an offset at which to start returning records
    # @option (columnname) [String] in this option, the key is the columnname and
    #   the value is the value that you want to filter by.  By including
    #   columnnames in the options list, you are essentially adding]
    #   a WHERE clause to your query.
    def self.records(dataset_name, options = {})
      # GET reference-data/{dataset}/records
      get(full_path(dataset_name, 'records'), :params => options)
{'fraction_non_alphanumeric': 0.11163275952008346, 'fraction_numerical': 0.014084507042253521, 'mean_word_length': 3.0635593220338984, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '6935114', 'n_tokens_mistral': 585, 'n_tokens_neox': 576, 'n_words': 173}