<commit_before># Name::          Bibkeys
# Author::        <NAME> | <EMAIL>
# Copyright::     Copyright (c) 2012 <NAME> 
# License::       MIT License | http://lmullen.mit-license.org/

require 'bibtex'

# This class loads a BibTeX file passed to it and provides a method to 
# list its keys, sorted or unsorted
class Bibkeys

  # Load the BibTeX file 
  def initialize ( filename , sort )
    @bib = BibTeX.open(filename)
    @sort = sort
  end


  # List all the keys in the BibTeX file
  def list

    keys = Array.new

    @bib.each do |entry|
      keys.push entry.key
    end

    if @sort
      puts keys.sort
    else 
      puts keys
    end

  end

end
<commit_msg>added default value to sort<commit_after># Name::          Bibkeys
# Author::        <NAME> | <EMAIL>
# Copyright::     Copyright (c) 2012 <NAME> 
# License::       MIT License | http://lmullen.mit-license.org/

require 'bibtex'

# This class loads a BibTeX file passed to it and provides a method to 
# list its keys, sorted or unsorted
class Bibkeys

  # Load the BibTeX file 
  def initialize ( filename , sort=false )
    @bib = BibTeX.open(filename)
    @sort = sort
  end


  # List all the keys in the BibTeX file
  def list

    keys = Array.new

    @bib.each do |entry|
      keys.push entry.key
    end

    if @sort
      puts keys.sort
    else 
      puts keys
    end

  end

end

{'fraction_non_alphanumeric': 0.08686131386861314, 'fraction_numerical': 0.00583941605839416, 'mean_word_length': 2.2411347517730498, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5345251', 'n_tokens_mistral': 483, 'n_tokens_neox': 430, 'n_words': 164}