Sha256: a8b32e06af8659c204d6a85ffebcc26b262071b6a130a22e5ce0a433b7fb65a6

Contents?: true

Size: 195 Bytes

Versions: 2

Compression:

Stored size: 195 Bytes

Contents

require 'levenshtein'

class Middleman::Blog::Similar::Algorithm::Levenshtein < ::Middleman::Blog::Similar::Algorithm
  def distance(a)
    ::Levenshtein.distance(article.body, a.body)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
middleman-blog-similar-1.1.1 lib/middleman-blog-similar/algorithm/levenshtein.rb
middleman-blog-similar-1.1.0 lib/middleman-blog-similar/algorithm/levenshtein.rb