<commit_before>module DParse
  module Parsers
    class CharIn < DParse::Parser
      def self.new(chars)
        chars
          .map { |c| DParse::Parsers::Char.new(c) }
          .reduce { |a, e| DParse::Parsers::Alt.new(a, e) }
      end

      def initialize(*)
        raise ArgumentError, "#{self.class} is not supposed to be initialized"
      end
    end<commit_msg>refactor(parsers): Use single Alt parser in CharIn parser<commit_after>module DParse
  module Parsers
    class CharIn < DParse::Parser
      def self.new(chars)
        DParse::Parsers::Alt.new(*chars.map { |c| DParse::Parsers::Char.new(c) })
      end

      def initialize(*)
        raise ArgumentError, "#{self.class} is not supposed to be initialized"
      end
    end
{'fraction_non_alphanumeric': 0.116, 'fraction_numerical': 0.0, 'mean_word_length': 2.6634146341463416, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3299606', 'n_tokens_mistral': 236, 'n_tokens_neox': 232, 'n_words': 64}