Popularity
4.5
Declining
Activity
0.0
Stable
22
11
3

Monthly Downloads: 12
Programming language: Elixir
License: MIT License

simhash alternatives and similar packages

Based on the "Algorithms and Data structures" category.
Alternatively, view simhash alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of simhash or a related project?

Add another 'Algorithms and Data structures' Package

README

Simhash

An Elixir implementation of Moses Charikar's Simhash.

Examples

iex> Simhash.similarity("Universal Avenue", "Universe Avenue")
0.71875
iex> Simhash.similarity("hocus pocus", "pocus hocus")
0.8125
iex> Simhash.similarity("Sankt Eriksgatan 1", "S:t Eriksgatan 1")
0.8125
iex> Simhash.similarity("Purple flowers", "Green grass")
0.5625

By default trigrams (N-gram of size 3) are used as language features, but you can set a different N-gram size:

iex> Simhash.similarity("hocus pocus", "pocus hocus", 1)
1.0
iex> Simhash.similarity("Sankt Eriksgatan 1", "S:t Eriksgatan 1", 6)
0.859375
iex> Simhash.similarity("Purple flowers", "Green grass", 6)
0.546875

Installation

The package can be installed by adding simhash to your list of dependencies in mix.exs:

def deps do
  [
    {:simhash, "~> 0.1.2"}
  ]
end