benchmark/memory.rb in fuzzy_match-1.3.1 vs benchmark/memory.rb in fuzzy_match-1.3.2
- old
+ new
@@ -18,17 +18,17 @@
# A reader used to convert every record (which could be an object of any type) into a string that will be used for similarity.
# (Example) Combine the make and model into something like "boeing 747"
# Note the downcase!
HAYSTACK_READER = lambda { |record| "#{record['Manufacturer']} #{record['Long Name']}".downcase }
-# Whether to even bother trying to find a match for something without an explicit block
+# Whether to even bother trying to find a match for something without an explicit group
# (Example) False, which is the default, which means we have more work to do
-MUST_MATCH_BLOCKING = false
+MUST_MATCH_GROUPING = false
-# Blockings
+# Groupings
# (Example) We made these by trial and error
-BLOCKINGS = RemoteTable.new(:url => "file://#{File.expand_path("../../examples/bts_aircraft/blockings.csv", __FILE__)}", :headers => :first_row).map { |row| row['regexp'] }
+GROUPINGS = RemoteTable.new(:url => "file://#{File.expand_path("../../examples/bts_aircraft/groupings.csv", __FILE__)}", :headers => :first_row).map { |row| row['regexp'] }
# Normalizers
# (Example) We made these by trial and error
NORMALIZERS = RemoteTable.new(:url => "file://#{File.expand_path("../../examples/bts_aircraft/normalizers.csv", __FILE__)}", :headers => :first_row).map { |row| row['regexp'] }
@@ -36,13 +36,13 @@
# (Example) We made these by trial and error
IDENTITIES = RemoteTable.new(:url => "file://#{File.expand_path("../../examples/bts_aircraft/identities.csv", __FILE__)}", :headers => :first_row).map { |row| row['regexp'] }
FINAL_OPTIONS = {
:read => HAYSTACK_READER,
- :must_match_blocking => MUST_MATCH_BLOCKING,
+ :must_match_grouping => MUST_MATCH_GROUPING,
:normalizers => NORMALIZERS,
:identities => IDENTITIES,
- :blockings => BLOCKINGS
+ :groupings => GROUPINGS
}
Memprof.start
d = FuzzyMatch.new HAYSTACK, FINAL_OPTIONS