<commit_before>require './puzloader'

def debug( name, value )
  printf "%s: %d %04x\n", name, value, value
end

puz = PuzzleLoader.new( '2014-4-22-LosAngelesTimes.puz' )

debug 'Width ', puz.width
debug 'Height', puz.height
debug 'Clues ', puz.num_clues
debug 'Scrambled', puz.scrambled? ? 1 : 0

puts %(
Title:  #{puz.title}
Author: #{puz.author}
Copy:   #{puz.copyright}
)

puz.rows.each { |row| puts row }

puz.clues.each { |clue| puts clue }
<commit_msg>Displays clues as well as the other info<commit_after>require 'pp'

require './puzloader'
require './crosswordgrid'

def debug( name, value )
  printf "%-10s: %d %04x\n", name, value, value
end

puz = PuzzleLoader.new( '2014-4-22-LosAngelesTimes.puz' )

debug 'Width', puz.width
debug 'Height', puz.height
debug 'Clues', puz.num_clues
debug 'Scrambled', puz.scrambled? ? 1 : 0

puts %(
Title:      #{puz.title}
Author:     #{puz.author}
Copyright:  #{puz.copyright}

)

puz.clues.each_slice( 2 ) { |clue| puts clue.join ' :: ' }

cgrid = CrosswordGrid.new( puz.rows )

pp cgrid.grid

{'fraction_non_alphanumeric': 0.16506717850287908, 'fraction_numerical': 0.02399232245681382, 'mean_word_length': 3.9904306220095696, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6023168', 'n_tokens_mistral': 448, 'n_tokens_neox': 428, 'n_words': 105}