<commit_before>require 'helper'

class TestSoulmate < Test::Unit::TestCase
  def test_integration_can_load_values_and_query
    items = []
    venues = File.open(File.expand_path(File.dirname(__FILE__)) + '/samples/venues.json', "r")
    venues.each_line do |venue|
      items << JSON.parse(venue)
    end
    
    Soulmate::Loader.new('venues').load(items)
    
    matcher = Soulmate::Matcher.new('venues')
    results = matcher.matches_for_term('stad', :limit => 5)
    
    assert_equal 3, results.size
    assert_equal 'Angel Stadium', results[0]['term']
  end
end
<commit_msg>add another assert just to get the hang of this<commit_after>require 'helper'

class TestSoulmate < Test::Unit::TestCase
  def test_integration_can_load_values_and_query
    items = []
    venues = File.open(File.expand_path(File.dirname(__FILE__)) + '/samples/venues.json', "r")
    venues.each_line do |venue|
      items << JSON.parse(venue)
    end
    
    items_loaded = Soulmate::Loader.new('venues').load(items)
    
    assert_equal 5, items_loaded
    
    matcher = Soulmate::Matcher.new('venues')
    results = matcher.matches_for_term('stad', :limit => 5)
    
    assert_equal 3, results.size
    assert_equal 'Angel Stadium', results[0]['term']
  end
end

{'fraction_non_alphanumeric': 0.12769353551476456, 'fraction_numerical': 0.00558659217877095, 'mean_word_length': 3.8230769230769233, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '621802', 'n_tokens_mistral': 421, 'n_tokens_neox': 412, 'n_words': 81}