<commit_before>module MT940Structured
  class Header
    R_RABOBANK = /^:940:/
    R_ABN_AMRO = /ABNANL/
    R_TRIODOS = /^:25:TRIODOSBANK|^:25:NL\d{2}TRIO/
    R_ING = /INGBNL/
    R_DEUTSCHE_BANK = /:20:DEUTDE/
    R_KNAB = /KNABNL/
    R_VAN_LANSCHOT = /FVLBNL/
    R_SNS = /SNSBNL/
    R_NEDBANK = /^Nedcor Nedbank/
    R_ASN = /ASNBNL/
    R_REGIO_BANK = /RBRBNL/
    R_MONEYOU = /MOYONL21/

    def initialize(raw_lines)
      @raw_lines = raw_lines
    end

    def parser
      if @raw_lines[0].match(R_RABOBANK)
        MT940Structured::Parsers::Rabobank::Parser.new
      elsif @raw_lines[0].match(R_ABN_AMRO)
        MT940Structured::Parsers::Abnamro::Parser.new
      elsif @raw_lines[0].match(R_MONEYOU)
        MT940Structured::Parsers::Abnamro::Parser.new("Moneyou")
      elsif @raw_lines[1] && @raw_lines[1].match(R_TRIODOS)
        MT940Structured::Parsers::Triodos::Parser.new
      elsif @raw_lines[0].match(R_ING)
        MT940Structured::Parsers::Ing::Parser.new
      elsif @raw_lines[0].match(R_DEUTSCHE_BANK)
         MT940Structured::Parsers::DeutscheBank::Parser.new
      elsif @raw_lines[0].match(R_KNAB)
        MT940Structured::Parsers::Knab::Parser.new
      elsif @raw_lines[0].match(R_VAN_LANSCHOT)
        MT940Structured::Parsers::VanLanschot::Parser.new
      elsif @raw_lines[0].match(R_SNS) || @raw_lines[0].match(R_ASN) || @raw_lines[0].match(R_REGIO_BANK)
        MT940Structured::Parsers::Sns::Parser.new
      elsif @raw_lines[0].match(R_NEDBANK)
        MT940Structured::Parsers::Nedbank::Parser.new
      else
         MT940Structured::Parsers::Generic::Parser.new
        #raise UnsupportedBankError.new
      end
    end

  end
  class UnsupportedBankError < StandardError

  end
end
<commit_msg>Remove specific deutsche bank parser<commit_after>module MT940Structured
  class Header
    R_RABOBANK = /^:940:/
    R_ABN_AMRO = /ABNANL/
    R_TRIODOS = /^:25:TRIODOSBANK|^:25:NL\d{2}TRIO/
    R_ING = /INGBNL/
    R_DEUTSCHE_BANK = /:20:DEUTDE/
    R_KNAB = /KNABNL/
    R_VAN_LANSCHOT = /FVLBNL/
    R_SNS = /SNSBNL/
    R_NEDBANK = /^Nedcor Nedbank/
    R_ASN = /ASNBNL/
    R_REGIO_BANK = /RBRBNL/
    R_MONEYOU = /MOYONL21/

    def initialize(raw_lines)
      @raw_lines = raw_lines
    end

    def parser
      if @raw_lines[0].match(R_RABOBANK)
        MT940Structured::Parsers::Rabobank::Parser.new
      elsif @raw_lines[0].match(R_ABN_AMRO)
        MT940Structured::Parsers::Abnamro::Parser.new
      elsif @raw_lines[0].match(R_MONEYOU)
        MT940Structured::Parsers::Abnamro::Parser.new("Moneyou")
      elsif @raw_lines[1] && @raw_lines[1].match(R_TRIODOS)
        MT940Structured::Parsers::Triodos::Parser.new
      elsif @raw_lines[0].match(R_ING)
        MT940Structured::Parsers::Ing::Parser.new
      # elsif @raw_lines[0].match(R_DEUTSCHE_BANK)
      #    MT940Structured::Parsers::DeutscheBank::Parser.new
      elsif @raw_lines[0].match(R_KNAB)
        MT940Structured::Parsers::Knab::Parser.new
      elsif @raw_lines[0].match(R_VAN_LANSCHOT)
        MT940Structured::Parsers::VanLanschot::Parser.new
      elsif @raw_lines[0].match(R_SNS) || @raw_lines[0].match(R_ASN) || @raw_lines[0].match(R_REGIO_BANK)
        MT940Structured::Parsers::Sns::Parser.new
      elsif @raw_lines[0].match(R_NEDBANK)
        MT940Structured::Parsers::Nedbank::Parser.new
      else
         MT940Structured::Parsers::Generic::Parser.new
        #raise UnsupportedBankError.new
      end
    end

  end
  class UnsupportedBankError < StandardError

  end
end

{'fraction_non_alphanumeric': 0.12809564474807855, 'fraction_numerical': 0.03472815257614575, 'mean_word_length': 3.365217391304348, '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': '7532946', 'n_tokens_mistral': 1511, 'n_tokens_neox': 1429, 'n_words': 166}