<commit_before>class Cluster
  attr_accessor :name, :data

  def initialize(arg={})
    @name = arg[:name]
    @data = arg[:data] 
  end

  def id
    name.scan(/Cluster\s(.)/).join
  end

  def members
    entries.join(',')
  end

  def representative
    @data.split("\n").map{|line|line.scan(/>(.+)\.{3}\s\*/)}.flatten
  end
  alias :rep_seq :representative

  def size
    entries.size
  end
  alias :length :size

  def entries
    @data.split("\n").map{|line|line.scan(/>(.+)\.{3}/)}
  end
end<commit_msg>remove bug in cluster_id method<commit_after>class Cluster
  attr_accessor :name, :data

  def initialize(arg={})
    self.name = arg[:name]
    self.data = arg[:data] 
  end

  def cluster_id
    name.scan(/Cluster\s(.*)/).join
  end

  def members
    entries.join(',')
  end

  def representative
    data.split("\n").map{|line|line.scan(/>(.+)\.{3}\s\*/)}.join
  end
  alias :rep_seq :representative

  def size
    entries.size
  end
  alias :length :size

  def entries
    data.split("\n").map{|line|line.scan(/>(.+)\.{3}/)}
  end
end
{'fraction_non_alphanumeric': 0.18536121673003803, 'fraction_numerical': 0.0038022813688212928, 'mean_word_length': 2.829090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '646609', 'n_tokens_mistral': 413, 'n_tokens_neox': 384, 'n_words': 81}