<commit_before>=begin
Copyright 2011 <NAME>
See README for licence information.
http://babel-bridge.rubyforge.org/
=end

module BabelBridge
# generated by a :poly PatternElement
# Not subclassed
class ManyNode < NonTerminalNode

  def delimiter_matches
    @delimiter_matches||=[]
  end

  def separate_delimiter_matches
    count = 0
    @matches, @delimiter_matches = @matches.partition {|el| count+=1;(count%2==1)}
    update_match_length
  end

  def inspect_helper(list,options)
    simple=options[:simple]
    ret=list.collect {|a|a.inspect(options)}.compact
    ret= if ret.length==0 then simple ? nil : "[]"<commit_msg>ensure deliminter matches is 1 shorter than matches<commit_after>=begin
Copyright 2011 <NAME>
See README for licence information.
http://babel-bridge.rubyforge.org/
=end

module BabelBridge
# generated by a :poly PatternElement
# Not subclassed
class ManyNode < NonTerminalNode

  def delimiter_matches
    @delimiter_matches||=[]
  end

  def separate_delimiter_matches
    count = 0
    @matches, @delimiter_matches = @matches.partition {|el| count+=1;(count%2==1)}
    @delimiter_matches = @delimiter_matches[0..@matches.length-2] #delimiter_matches should be exactly 1 shorter
    update_match_length
  end

  def inspect_helper(list,options)
    simple=options[:simple]
    ret=list.collect {|a|a.inspect(options)}.compact
    ret= if ret.length==0 then simple ? nil : "[]"
{'fraction_non_alphanumeric': 0.10889679715302492, 'fraction_numerical': 0.015658362989323844, 'mean_word_length': 4.738775510204082, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '733253', 'n_tokens_mistral': 471, 'n_tokens_neox': 437, 'n_words': 113}