
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
= amatch - Approximate Matching Extension for Ruby
== Description
** This is a workaround version for Rubinius users that makes it possible to install this gem. For the original, see https://github.com/flori/amatch. Read the below description to see how you should include this gem in your Gemfile. **
This is a collection of classes that can be used for Approximate matching, searching, and comparing of Strings. They implement algorithms that compute the Levenshtein edit distance, Sellers edit distance, the Hamming distance, the longest common subsequence length, the longest common substring length, the pair distance metric, the Jaro-Winkler metric.
== Download
The latest version of amatch can be found at
Online Documentation should be located at
== Installation
Just type into the command line as root:
If you have installed rake (rake.rubyforge.org), you can also type:
To install this extension as a gem type
If you use Bundler, put this line in your Gemfile, and run bundle
== Examples require 'amatch'
include Amatch
m = Sellers.new("pattern")
m.match("pattren")
m.substitution = m.insertion = 3
m.match("pattren")
m.reset_weights
m.match(["pattren","parent"])
m.search("abcpattrendef")
m = Levenshtein.new("pattern")
m.match("pattren")
m.search("abcpattrendef")
"pattern language".levenshtein_similar("language of patterns")
m = Hamming.new("pattern")
m.match("pattren")
"pattern language".hamming_similar("language of patterns")
m = PairDistance.new("pattern")
m.match("pattr en")
m.match("pattr en", nil)
m.match("pattr en", /t+/)
"pattern language".pair_distance_similar("language of patterns")
m = LongestSubsequence.new("pattern")
m.match("pattren")
"pattern language".longest_subsequence_similar("language of patterns")
m = LongestSubstring.new("pattern")
m.match("pattren")
"pattern language".longest_substring_similar("language of patterns")
m = Jaro.new("pattern")
m.match("paTTren")
m.ignore_case = false m.match("paTTren")
"pattern language".jaro_similar("language of patterns")
m = JaroWinkler.new("pattern")
m.match("paTTren")
m.ignore_case = false m.match("paTTren")
m.scaling_factor = 0.05 m.match("pattren")
"pattern language".jarowinkler_similar("language of patterns")
== Author
Florian Frank mailto:flori@ping.de
== License
This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation: http://www.gnu.org/copyleft/gpl.html
FAQs
Unknown package
We found that amatch-rbx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.