<commit_before># encoding: utf-8
#
#  = Query Model
#
################################################################################

class Query < AbstractQuery
  belongs_to :user

  # Parameters allowed in every query.
  self.global_params = {
    # Allow every query to customize its title.
    :title? => [:string],
  }

  # Parameters allowed in every query for a given model.
  self.model_params = {
    :Comment => {
      :created_at?  => [:time],
      :updated_at?  => [:time],
      :users?       => [User],
      :types?       => :string,
      :summary_has? => :string,
      :content_has? => :string,
    },
    :Image => {
      :created_at?      => [:time],
      :updated_at?      => [:time],
      :date?            => [:date],
      :users?           => [User],
      :names?           => [:string],
      :synonym_names?   => [:string],
      :children_names?  => [:string],
      :locations?       => [:string],
      :projects?        => [:string],
      :species_lists?   => [:string],
      :has_observation? => {:string => [:yes]},
      :size?            => [{:string => Image.all_sizes - [:full_size]}],
      :content_types?   => :string,
      :has_notes?       => :boolean,
      :notes_has?       => :string,
      :copyright_holder_has? => :string,
      :license?         => License,
      :has_votes?       => :boolean,
      :quality?         => [:integer],
      :confidence?      => [:integer],
      :ok_for_export?   => :boolean,
    },
    :Location => {
      :created_at?  => [:time],
      :updated_at?  => [:time],
      :users?       => [User],
      :north?       => :float,
      :south?       => :float,
      :east?        => :float,
      :west?        => :float,
    },
    :LocationDescription => {
      :created_at?  => [:time],
      :updated_at?  => [:time],
      :users?    => [User],
    },<commit_msg>Was expecting integers for image quality and confidence in image queries.  Should be floats.<commit_after># encoding: utf-8
#
#  = Query Model
#
################################################################################

class Query < AbstractQuery
  belongs_to :user

  # Parameters allowed in every query.
  self.global_params = {
    # Allow every query to customize its title.
    :title? => [:string],
  }

  # Parameters allowed in every query for a given model.
  self.model_params = {
    :Comment => {
      :created_at?  => [:time],
      :updated_at?  => [:time],
      :users?       => [User],
      :types?       => :string,
      :summary_has? => :string,
      :content_has? => :string,
    },
    :Image => {
      :created_at?      => [:time],
      :updated_at?      => [:time],
      :date?            => [:date],
      :users?           => [User],
      :names?           => [:string],
      :synonym_names?   => [:string],
      :children_names?  => [:string],
      :locations?       => [:string],
      :projects?        => [:string],
      :species_lists?   => [:string],
      :has_observation? => {:string => [:yes]},
      :size?            => [{:string => Image.all_sizes - [:full_size]}],
      :content_types?   => :string,
      :has_notes?       => :boolean,
      :notes_has?       => :string,
      :copyright_holder_has? => :string,
      :license?         => License,
      :has_votes?       => :boolean,
      :quality?         => [:float],
      :confidence?      => [:float],
      :ok_for_export?   => :boolean,
    },
    :Location => {
      :created_at?  => [:time],
      :updated_at?  => [:time],
      :users?       => [User],
      :north?       => :float,
      :south?       => :float,
      :east?        => :float,
      :west?        => :float,
    },
    :LocationDescription => {
      :created_at?  => [:time],
      :updated_at?  => [:time],
      :users?    => [User],
    },
{'fraction_non_alphanumeric': 0.21836358852933438, 'fraction_numerical': 0.0005261773217574323, 'mean_word_length': 1.9587548638132295, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 91, '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': '4780587', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1201, 'n_words': 245}