<commit_before>require 'ruby-units'

module StringTensions
  module Convert
  
    def self.kg_to_lbs(kg)
      unit(kg, 'kg').to('lbs').scalar.to_f
    end
    
    def self.lbs_to_kg(pounds)
      unit(pounds, 'lbs').to('kg').scalar.to_f
    end
  
    def self.inches_to_mm(inches)
      unit(inches, 'inch').to('mm').scalar.to_f
    end
    
    def self.mm_to_inches(mm)
      unit(mm, 'mm').to('inch').scalar.to_f
    end
    
    def self.g_m_to_lbs_inch(g)
      unit(g, 'g/m').to('lbs/inch').scalar.to_f
    end
  
    def self.unit(qty, dim)
      ::Unit.new("#{qty} #{dim}")
    end
  
  end  
end<commit_msg>add convert method lbs_inch_to_g_m<commit_after>require 'ruby-units'

module StringTensions
  module Convert
  
    def self.kg_to_lbs(kg)
      unit(kg, 'kg').to('lbs').scalar.to_f
    end
    
    def self.lbs_to_kg(pounds)
      unit(pounds, 'lbs').to('kg').scalar.to_f
    end
  
    def self.inches_to_mm(inches)
      unit(inches, 'inch').to('mm').scalar.to_f
    end
    
    def self.mm_to_inches(mm)
      unit(mm, 'mm').to('inch').scalar.to_f
    end
    
    def self.g_m_to_lbs_inch(g)
      unit(g, 'g/m').to('lbs/inch').scalar.to_f
    end

    def self.lbs_inch_to_g_m(lbs)
      unit(lbs, 'lbs/inch').to('g/m').scalar.to_f
    end
  
    def self.unit(qty, dim)
      ::Unit.new("#{qty} #{dim}")
    end
  
  end  
end
{'fraction_non_alphanumeric': 0.1602658788774003, 'fraction_numerical': 0.0, 'mean_word_length': 2.4566326530612246, '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': '4714487', 'n_tokens_mistral': 588, 'n_tokens_neox': 585, 'n_words': 85}