<commit_before>module Paperclip

  class Transcode < Processor

    def initialize file, options = {}, attachment = nil
      @file               = file
      @format             = options.delete(:format)
      @options            = options
      @current_format     = File.extname(@file.path)
      @basename           = File.basename(@file.path, @current_format)
#      @dst                = dst
    end

    def make
      dst = Tempfile.new([@basename, @format].compact.join("."))
      puts '***********************'
      puts cmd(dst)
      begin
        success = system cmd(dst)<commit_msg>fixed bug in transcode.rb<commit_after>module Paperclip

  class Transcode < Processor

    def initialize file, options = {}, attachment = nil
      @file               = file
      @format             = options[:format]
      @options            = options
      @current_format     = File.extname(@file.path)
      @basename           = File.basename(@file.path, @current_format)
#      @dst                = dst
    end

    def make
      dst = Tempfile.new([@basename, @format].compact.join("."))
      puts '***********************'
      puts cmd(dst)
      begin
        success = system cmd(dst)
{'fraction_non_alphanumeric': 0.14131338320864506, 'fraction_numerical': 0.0, 'mean_word_length': 1.853080568720379, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1151721', 'n_tokens_mistral': 333, 'n_tokens_neox': 325, 'n_words': 76}