mort666_simhash 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3b3b62e04b6e50547de7e7edf3441da79ce41869
4
+ data.tar.gz: dde5d235ee1d2bbeaa9304fe235768883c6525cf
5
+ SHA512:
6
+ metadata.gz: c333facb22f608bf1caec2de3023f30ccc552f116a323063819dfcfe2bc49d1bc397a3f930d3ac8caa4e19d1f6308542096b4732e5ae308a9c1dc241083674ee
7
+ data.tar.gz: 5c1ef0e033e82009858a7136e23c01936ce7083c551783c8987f36a31a294e0a1babdc82e2bd3a943c60a444bb724fe09affc2b1998495b2172dd8d58b1e06cf
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+
2
+ LICENSE
3
+
4
+ The MIT License
5
+
6
+ Copyright (c) 2002 Charikar, Simhash algorythm
7
+ Copyright (c) 2009 Andre Hagenbruch, Python implementation
8
+ Copyright (c) 2010 Bookmate.ru
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+
data/README.rdoc ADDED
@@ -0,0 +1,53 @@
1
+ ==Absctract
2
+
3
+ This is implementation of {Moses Charikar's simhashes}[http://portal.acm.org/citation.cfm?id=509965] in Ruby.
4
+
5
+ ==Usage
6
+
7
+ When you have a string and want to calculate it's simhash, you should
8
+
9
+ my_string.simhash
10
+
11
+ By default it will generate 64-bit integer - that is simhash for this string
12
+
13
+ It's always better to tokenize string before simhashing. It's as simple as
14
+
15
+ my_string.simhash(:split_by => / /)
16
+
17
+ This will generate 64-bit integer based, but will split string into words before.
18
+ It's handy when you need to calculate similarity of strings based on word usage.
19
+ You can split string as you like: by letters/sentences/specific letter-combinations, etc.
20
+
21
+ my_string.simhash(:split_by => /./, :hashbits => 512)
22
+
23
+ Sometimes you might need longer simhash (finding similarity for very long strings is a good example).
24
+ You can set length of result hash by passing hashbits parameter. This example will return 512-bit simhash
25
+ for your string splitted by sentences.
26
+
27
+ ==Advanced usage
28
+
29
+ It's useful to clean your string before simhashing. But it's useful not to clean, too.
30
+
31
+ Here are examples:
32
+
33
+ my_string.simhash(:stop_words => true) # here we clean
34
+
35
+ This will find stop-words in your string and remove them before simhashing. Stop-words are "the", "not", "about", etc.
36
+ Currently we remove only Russian and English stop-words.
37
+
38
+ my_string.simhash(:preserve_punctuation => true) # here we not
39
+
40
+ This will not remove punctuation before simhashing. Yes, we remove all dots, commas, etc. after splitting string to words by default.
41
+ Because different punctiation does not mean difference in general. If you not agree you can turn this default off.
42
+
43
+ ==Installation
44
+
45
+ As usual:
46
+
47
+ gem install simhash
48
+
49
+ But if you have {GNU MP library}[http://gmplib.org/], simhash will work faster! To check out which version is used, type:
50
+
51
+ Simhash::DEFAULT_STRING_HASH_METHOD
52
+
53
+ It should return symbol. If symbol ends with "rb", your simhash is slow. If you want make it faster, install GNU MP.
data/Rakefile ADDED
@@ -0,0 +1,51 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rdoc/task'
4
+ require "rake/extensiontask"
5
+
6
+ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
7
+ require 'simhash'
8
+
9
+ desc 'Default: run unit tests.'
10
+ task :default => [:compile, :test]
11
+
12
+ Rake::ExtensionTask.new('string_hashing')
13
+
14
+ Rake::Task[:test].prerequisites << :compile
15
+
16
+ desc 'Test the simhash gem'
17
+ Rake::TestTask.new(:test) do |t|
18
+ t.libs << '.'
19
+ t.pattern = 'test/**/*_test.rb'
20
+ t.verbose = true
21
+ end
22
+
23
+ desc 'Start an IRB session with all necessary files required.'
24
+ task :shell do |t|
25
+ chdir File.dirname(__FILE__)
26
+ exec 'irb -I lib/ -I lib/simhash -I lib/string -I lib/integer -r rubygems'
27
+ end
28
+
29
+ desc 'Build the gemspec.'
30
+ task :gemspec do |t|
31
+ exec 'gem build mort666-simhash.gemspec'
32
+ end
33
+
34
+ desc "Print a list of the files to be put into the gem"
35
+ task :manifest do
36
+ spec.files.each do |file|
37
+ puts file
38
+ end
39
+ end
40
+
41
+ desc "Generate a gemspec file for GitHub"
42
+ task :gemspec do
43
+ File.open("#{spec.name}.gemspec", 'w') do |f|
44
+ f.write spec.to_ruby
45
+ end
46
+ end
47
+
48
+ desc "Build the gem into the current directory"
49
+ task :gem => :gemspec do
50
+ `gem build #{spec.name}.gemspec`
51
+ end
@@ -0,0 +1,48 @@
1
+ require 'mkmf'
2
+
3
+ extension_name = 'string_hashing'
4
+ # should link against the libgmp library
5
+ $LDFLAGS << ' -lgmp'
6
+
7
+ # Sort out the universal vs. single-archicture build problems on MacOS X
8
+ if RUBY_PLATFORM.include?( 'darwin' )
9
+ puts "MacOS X build: fixing architecture flags:"
10
+
11
+ commonflags = nil
12
+ if ENV['ARCHFLAGS']
13
+ puts " using the value in ARCHFLAGS environment variable (%p)." % [ ENV['ARCHFLAGS'] ]
14
+ commonflags = ENV['ARCHFLAGS']
15
+ else
16
+ $stderr.puts %{
17
+ =========== WARNING ===========
18
+
19
+ You are building this extension on OS X without setting the
20
+ ARCHFLAGS environment variable.
21
+
22
+ If you are seeing this message, that means that the
23
+ build will probably fail.
24
+
25
+ ===================================
26
+ }.gsub( /^\t+/, ' ' )
27
+ end
28
+
29
+ if commonflags
30
+ $CFLAGS.gsub!( /-arch\s+\S+ /, '' )
31
+ $LDFLAGS.gsub!( /-arch\s+\S+ /, '' )
32
+ CONFIG['LDSHARED'].gsub!( /-arch\s+\S+ /, '' )
33
+
34
+ $CFLAGS << ' ' << commonflags
35
+ $LDFLAGS << ' ' << commonflags
36
+ CONFIG['LDSHARED'] << ' ' << commonflags
37
+ end
38
+ end
39
+
40
+ if (find_header("gmp.h") rescue false)
41
+ $stderr.puts "Configuring extensions"
42
+ dir_config(extension_name)
43
+ create_makefile(extension_name)
44
+ else
45
+ $stderr.puts "Skipping building of C extension"
46
+ # creating foo Makefile to avoid building stuff
47
+ File.open(File.join(File.dirname(__FILE__), "Makefile"), "w"){|f| f.write("all: \ninstall: \n")}
48
+ end
@@ -0,0 +1,64 @@
1
+ #include "ruby.h"
2
+ #include <gmp.h>
3
+ #include <stdio.h>
4
+
5
+ VALUE StringHashing = Qnil;
6
+
7
+ void Init_string_hashing();
8
+
9
+ VALUE method_hash_vl(VALUE self, VALUE bitlength);
10
+
11
+ void Init_string_hashing() {
12
+ rb_define_method(rb_cString, "hash_vl", method_hash_vl, 1);
13
+ }
14
+
15
+ VALUE method_hash_vl(VALUE self, VALUE bitlength) {
16
+ int bl = NUM2INT(bitlength);
17
+
18
+ // for hard typecasting
19
+ unsigned char one_char;
20
+ char* result;
21
+ result = malloc(bl*sizeof(char));
22
+ unsigned long long len = RSTRING_LEN(self);
23
+ char *string = RSTRING_PTR(self);
24
+
25
+ if(len == 0){ return 0; }
26
+
27
+ mpz_t x, mask, long_len;
28
+ mpz_init_set_ui (long_len, len);
29
+ one_char = RSTRING_PTR(self)[0];
30
+ mpz_init_set_ui (x, one_char << 7);
31
+ int m = 1000003;
32
+
33
+ // generating mask of length bitlength filled with 1
34
+ mpz_init (mask);
35
+ mpz_ui_pow_ui(mask, 2, bl);
36
+ mpz_sub_ui (mask, mask, 1);
37
+
38
+ mpz_t computations, byte;
39
+ mpz_init(computations);
40
+ mpz_init2 (byte, 8);
41
+
42
+ int i = 0;
43
+ for(i; i < len; i++) {
44
+ one_char = string[i];
45
+ mpz_set_ui(byte, one_char);
46
+ mpz_mul_ui(computations, x, m);
47
+ mpz_xor(computations, computations, byte);
48
+ mpz_and (x, mask, computations);
49
+ }
50
+
51
+ mpz_xor(x, x, long_len);
52
+ //gmp_printf ("C xored x is %Zd\n", x);
53
+ mpz_get_str (result, 10, x);
54
+ VALUE res = rb_str_new2(result);
55
+
56
+ mpz_clear(x);
57
+ mpz_clear(byte);
58
+ mpz_clear(computations);
59
+ mpz_clear(mask);
60
+ mpz_clear(long_len);
61
+ free(result);
62
+
63
+ return res;
64
+ }
data/lib/integer.rb ADDED
@@ -0,0 +1,16 @@
1
+ class Integer
2
+ # Hamming distance – number of different bits in same positions
3
+ # H(1001, 1110) = 3
4
+ # H(1001, 1000) = 1
5
+ def hamming_distance_to(integer)
6
+ total = 0
7
+ difference = self ^ integer
8
+
9
+ while difference > 0 do
10
+ total += 1 if (difference & 1).nonzero?
11
+ difference >>= 1
12
+ end
13
+
14
+ total
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module Simhash
2
+ module Stopwords
3
+ EN = " a able about above abst accordance according accordingly across act actually added adj adopted affected affecting affects after afterwards again against ah all almost alone along already also although always am among amongst an and announce another any anybody anyhow anymore anyone anything anyway anyways anywhere apparently approximately are aren arent arise around as aside ask asking at auth available away awfully b back be became because become becomes becoming been before beforehand begin beginning beginnings begins behind being believe below beside besides between beyond biol both brief briefly but by c ca came can cannot can't cause causes certain certainly co com come comes contain containing contains could couldnt d date did didn't different do does doesn't doing done don't down downwards due during e each ed edu effect eg eight eighty either else elsewhere end ending enough especially et et-al etc even ever every everybody everyone everything everywhere ex except f far few ff fifth first five fix followed following follows for former formerly forth found four from further furthermore g gave get gets getting give given gives giving go goes gone got gotten h had happens hardly has hasn't have haven't having he hed hence her here hereafter hereby herein heres hereupon hers herself hes hi hid him himself his hither home how howbeit however hundred i id ie if i'll im immediate immediately importance important in inc indeed index information instead into invention inward is isn't it itd it'll its itself i've j just k keep keeps kept keys kg km know known knows l largely last lately later latter latterly least less lest let lets like liked likely line little 'll look looking looks ltd m made mainly make makes many may maybe me mean means meantime meanwhile merely mg might million miss ml more moreover most mostly mr mrs much mug must my myself n na name namely nay nd near nearly necessarily necessary need needs neither never nevertheless new next nine ninety no nobody non none nonetheless noone nor normally nos not noted nothing now nowhere o obtain obtained obviously of off often oh ok okay old omitted on once one ones only onto or ord other others otherwise ought our ours ourselves out outside over overall owing own p page pages part particular particularly past per perhaps placed please plus poorly possible possibly potentially pp predominantly present previously primarily probably promptly proud provides put q que quickly quite qv r ran rather rd re readily really recent recently ref refs regarding regardless regards related relatively research respectively resulted resulting results right run s said same saw say saying says sec section see seeing seem seemed seeming seems seen self selves sent seven several shall she shed she'll shes should shouldn't show showed shown showns shows significant significantly similar similarly since six slightly so some somebody somehow someone somethan something sometime sometimes somewhat somewhere soon sorry specifically specified specify specifying state states still stop strongly sub substantially successfully such sufficiently suggest sup sure t take taken taking tell tends th than thank thanks thanx that that'll thats that've the their theirs them themselves then thence there thereafter thereby thered therefore therein there'll thereof therere theres thereto thereupon there've these they theyd they'll theyre they've think this those thou though thoughh thousand throug through throughout thru thus til tip to together too took toward towards tried tries truly try trying ts twice two u un under unfortunately unless unlike unlikely until unto up upon ups us use used useful usefully usefulness uses using usually v value various 've very via viz vol vols vs w want wants was wasn't way we wed welcome we'll went were weren't we've what whatever what'll whats when whence whenever where whereafter whereas whereby wherein wheres whereupon wherever whether which while whim whither who whod whoever whole who'll whom whomever whos whose why widely willing wish with within without won't words world would wouldn't www x y yes yet you youd you'll your youre yours yourself yourselves you've z zero "
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ # encoding: utf-8
2
+ module Simhash
3
+ module Stopwords
4
+ RU = " а е и ж м о на не ни об но он мне мои мож она они оно мной много многочисленное многочисленная многочисленные многочисленный мною мой мог могут можно может можхо мор моя моё мочь над нее оба нам нем нами ними мимо немного одной одного менее однажды однако меня нему меньше ней наверху него ниже мало надо один одиннадцать одиннадцатый назад наиболее недавно миллионов недалеко между низко меля нельзя нибудь непрерывно наконец никогда никуда нас наш нет нею неё них мира наша наше наши ничего начала нередко несколько обычно опять около мы ну нх от отовсюду особенно нужно очень отсюда в во вон вниз внизу вокруг вот восемнадцать восемнадцатый восемь восьмой вверх вам вами важное важная важные важный вдали везде ведь вас ваш ваша ваше ваши впрочем весь вдруг вы все второй всем всеми времени время всему всего всегда всех всею всю вся всё всюду г год говорил говорит года году где да ее за из ли же им до по ими под иногда довольно именно долго позже более должно пожалуйста значит иметь больше пока ему имя пор пора потом потому после почему почти посреди ей два две двенадцать двенадцатый двадцать двадцатый двух его дел или без день занят занята занято заняты действительно давно девятнадцать девятнадцатый девять девятый даже алло жизнь далеко близко здесь дальше для лет зато даром первый перед затем зачем лишь десять десятый ею её их бы еще при был про процентов против просто бывает бывь если люди была были было будем будет будете будешь прекрасно буду будь будто будут ещё пятнадцать пятнадцатый друго другое другой другие другая других есть пять быть лучше пятый к ком конечно кому кого когда которой которого которая которые который которых кем каждое каждая каждые каждый кажется как какой какая кто кроме куда кругом с т у я та те уж со то том снова тому совсем того тогда тоже собой тобой собою тобою сначала только уметь тот тою хорошо хотеть хочешь хоть хотя свое свои твой своей своего своих свою твоя твоё раз уже сам там тем чем сама сами теми само рано самом самому самой самого семнадцать семнадцатый самим самими самих саму семь чему раньше сейчас чего сегодня себе тебе сеаой человек разве теперь себя тебя седьмой спасибо слишком так такое такой такие также такая сих тех чаще четвертый через часто шестой шестнадцать шестнадцатый шесть четыре четырнадцать четырнадцатый сколько сказал сказала сказать ту ты три эта эти что это чтоб этом этому этой этого чтобы этот стал туда этим этими рядом тринадцать тринадцатый этих третий тут эту суть чуть тысяч "
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ require File.join(File.dirname(__FILE__), "stopwords", "en")
2
+ require File.join(File.dirname(__FILE__), "stopwords", "ru")
3
+
4
+ module Simhash
5
+ module Stopwords
6
+ ALL = RU + EN
7
+ end
8
+ end
data/lib/simhash.rb ADDED
@@ -0,0 +1,93 @@
1
+ # encoding: utf-8
2
+
3
+ require 'active_support/core_ext/string/multibyte'
4
+ require 'unicode'
5
+
6
+ require 'string'
7
+ require 'integer'
8
+ require 'simhash/stopwords'
9
+
10
+ begin
11
+ require 'string_hashing'
12
+ rescue LoadError
13
+ end
14
+
15
+ module Simhash
16
+ DEFAULT_STRING_HASH_METHOD = String.public_instance_methods.include?("hash_vl") ? :hash_vl : :hash_vl_rb
17
+ PUNCTUATION_REGEXP = if RUBY_VERSION >= "1.9"
18
+ /(\s|\d|[^\p{L}]|\302\240| *— *|[«»…\-–—]| )+/u
19
+ else
20
+ /(\s|\d|\W|\302\240| *— *|[«»…\-–—]| )+/u
21
+ end
22
+
23
+ # Compare calculates the Hamming distance between two 64-bit integers
24
+ #
25
+ # Currently, this is calculated using the Kernighan method [1]. Other methods
26
+ # exist which may be more efficient and are worth exploring at some point
27
+ #
28
+ # [1] http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan
29
+ def self.compare(a, b)
30
+ v = a ^ b
31
+ c = 0
32
+ while v != 0 do
33
+ v &= v - 1
34
+ c += 1
35
+ end
36
+
37
+ return c
38
+ end
39
+
40
+ def self.hash(tokens, options={})
41
+ hashbits = options[:hashbits] || 64
42
+ hashing_method = options[:hashing_method] || DEFAULT_STRING_HASH_METHOD
43
+
44
+ v = [0] * hashbits
45
+ masks = v.dup
46
+ masks.each_with_index {|e, i| masks[i] = (1 << i)}
47
+
48
+ self.each_filtered_token(tokens, options) do |token|
49
+ hashed_token = token.send(hashing_method, hashbits).to_i
50
+ hashbits.times do |i|
51
+ v[i] += (hashed_token & masks[i]).zero? ? -1 : +1
52
+ end
53
+ end
54
+
55
+ fingerprint = 0
56
+
57
+ hashbits.times { |i| fingerprint += 1 << i if v[i] >= 0 }
58
+
59
+ fingerprint
60
+ end
61
+
62
+ def self.each_filtered_token(tokens, options={})
63
+ token_min_size = options[:token_min_size].to_i
64
+ stop_sentenses = options[:stop_sentenses]
65
+ tokens.each do |token|
66
+ # cutting punctuation (\302\240 is unbreakable space)
67
+ # Moved up to string class
68
+ # token = token.gsub(PUNCTUATION_REGEXP, ' ') if !options[:preserve_punctuation]
69
+
70
+ token = Unicode::downcase(token.strip)
71
+
72
+ # cutting stop-words
73
+ token = token.split(" ").reject{ |w| Stopwords::ALL.index(" #{w} ") != nil }.join(" ") if options[:stop_words]
74
+
75
+ # cutting stop-sentenses
76
+ next if stop_sentenses && stop_sentenses.include?(" #{token} ")
77
+
78
+ next if token.size.zero? || token.mb_chars.size < token_min_size
79
+
80
+ yield token
81
+ end
82
+ end
83
+
84
+ def self.filtered_tokens(tokens, options={})
85
+ filtered_tokens = []
86
+ self.each_filtered_token(tokens, options) { |token| filtered_tokens << token }
87
+ filtered_tokens
88
+ end
89
+
90
+ def self.hm
91
+ @@string_hash_method
92
+ end
93
+ end
data/lib/string.rb ADDED
@@ -0,0 +1,28 @@
1
+ class String
2
+ def simhash(options={})
3
+ split_by = options.delete(:split_by) || " "
4
+
5
+ # Do the punctuation clean before the split..
6
+ # You could argue this is not preserving the meaning doing so actually preserves the edge case where a hyphen is removed
7
+ # resulting hash does not match the same string with a space in there before the split
8
+ if options[:preserve_punctuation]
9
+ Simhash.hash(self.split(split_by), options)
10
+ else
11
+ Simhash.hash(self.gsub(Simhash::PUNCTUATION_REGEXP, ' ') .split(split_by), options)
12
+ end
13
+ end
14
+
15
+ def hash_vl_rb(length)
16
+ return 0 if self == ""
17
+
18
+ x = self.bytes.first << 7
19
+ m = 1000003
20
+ mask = (1<<length) - 1
21
+ self.each_byte{ |char| x = ((x * m) ^ char.to_i) & mask }
22
+
23
+ x ^= self.bytes.count
24
+ x = -2 if x == -1
25
+ x
26
+ end
27
+
28
+ end
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mort666_simhash
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.7
5
+ platform: ruby
6
+ authors:
7
+ - Alex Gusev
8
+ - Stephen Kapp
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-09-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activesupport
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: unicode
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake-compiler
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: bundler
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.6'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.6'
70
+ - !ruby/object:Gem::Dependency
71
+ name: minitest
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rake
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ description: Implementation of Charikar simhashes in Ruby
99
+ email:
100
+ - alex.gusev@bookmate.ru
101
+ - skapp@cortexinsight.com
102
+ executables: []
103
+ extensions:
104
+ - ext/string_hashing/extconf.rb
105
+ extra_rdoc_files: []
106
+ files:
107
+ - LICENSE
108
+ - README.rdoc
109
+ - Rakefile
110
+ - ext/string_hashing/extconf.rb
111
+ - ext/string_hashing/string_hashing.c
112
+ - lib/integer.rb
113
+ - lib/simhash.rb
114
+ - lib/simhash/stopwords.rb
115
+ - lib/simhash/stopwords/en.rb
116
+ - lib/simhash/stopwords/ru.rb
117
+ - lib/string.rb
118
+ homepage: http://github.com/mort666/simhash
119
+ licenses: []
120
+ metadata: {}
121
+ post_install_message:
122
+ rdoc_options: []
123
+ require_paths:
124
+ - lib
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ requirements: []
136
+ rubyforge_project:
137
+ rubygems_version: 2.4.3
138
+ signing_key:
139
+ specification_version: 4
140
+ summary: 'Gives you possbility to convert string into simhashes to futher use: finding
141
+ near-duplicates, similar strings, etc.'
142
+ test_files: []