<commit_before>require_relative '../../setup.rb'
require_relative '../shared/debug_output.rb'
require_relative '../shared/args.rb'
require_relative '../shared/system.rb'

input = $settings[:input]
format = $settings[:format] || 'text'

options = ''

if input.end_with? '.dab'
  target = input.gsub(/\.dab$/, '.dabca')
  psystem "ruby ./src/compiler/compiler.rb #{input} #{options} --with-cov > #{target} 2> /dev/null"
  input = target
end

if input.end_with? '.dabca'
  target = input.gsub(/\.dabca$/, '.dabcb')
  psystem "ruby ./src/tobinary/tobinary.rb #{options} < #{input} > #{target} 2> /dev/null"
  input = target
end<commit_msg>frontend: don't use /dev/null (doesn't work on windows)<commit_after>require_relative '../../setup.rb'
require_relative '../shared/debug_output.rb'
require_relative '../shared/args.rb'
require_relative '../shared/system.rb'

input = $settings[:input]
format = $settings[:format] || 'text'

options = ''

if input.end_with? '.dab'
  target = input.gsub(/\.dab$/, '.dabca')
  psystem "ruby ./src/compiler/compiler.rb #{input} #{options} --with-cov > #{target}"
  input = target
end

if input.end_with? '.dabca'
  target = input.gsub(/\.dabca$/, '.dabcb')
  psystem "ruby ./src/tobinary/tobinary.rb #{options} < #{input} > #{target}"
  input = target
end
{'fraction_non_alphanumeric': 0.20606531881804044, 'fraction_numerical': 0.0015552099533437014, 'mean_word_length': 3.875, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4461690', 'n_tokens_mistral': 468, 'n_tokens_neox': 463, 'n_words': 100}