<commit_before>#!/usr/bin/env ruby

GROUPS = [
  "generic",
  "string",
  "list",
  "set",
  "sorted_set",
  "hash",
  "pubsub",
  "transactions",
  "connection",
  "server",
  "scripting"
].freeze

GROUPS_BY_NAME = Hash[*
  GROUPS.each_with_index.map do |n,i|
    [n,i]
  end.flatten
].freeze

def argument arg
  name = arg["name"].is_a?(Array) ? arg["name"].join(" ") : arg["name"]
  name = arg["enum"].join "|" if "enum" == arg["type"]
  name = arg["command"] + " " + name if arg["command"]
  if arg["multiple"]
    name = "#{name} [#{name} ...]"
  end
  if arg["optional"]
    name = "[#{name}]"
  end
  name
end<commit_msg>generate-command-help.rb updated with new hyperloglog group.<commit_after>#!/usr/bin/env ruby

GROUPS = [
  "generic",
  "string",
  "list",
  "set",
  "sorted_set",
  "hash",
  "pubsub",
  "transactions",
  "connection",
  "server",
  "scripting",
  "hyperloglog"
].freeze

GROUPS_BY_NAME = Hash[*
  GROUPS.each_with_index.map do |n,i|
    [n,i]
  end.flatten
].freeze

def argument arg
  name = arg["name"].is_a?(Array) ? arg["name"].join(" ") : arg["name"]
  name = arg["enum"].join "|" if "enum" == arg["type"]
  name = arg["command"] + " " + name if arg["command"]
  if arg["multiple"]
    name = "#{name} [#{name} ...]"
  end
  if arg["optional"]
    name = "[#{name}]"
  end
  name
end
{'fraction_non_alphanumeric': 0.22045454545454546, 'fraction_numerical': 0.0, 'mean_word_length': 3.477966101694915, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5192590', 'n_tokens_mistral': 537, 'n_tokens_neox': 534, 'n_words': 111}