17 Feb 2017 12:00:01 UTC
- Distribution: String-Similex
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (576 / 0 / 0)
- KwaliteeBus factor: 1
- 46.67% Coverage
- License: artistic_2
- Perl: v5.6.0
- Activity24 month
- Download (3.19KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
String::Similex - gives a code to compare similar "visual" strings
use String::Similex; $code = similex($string); @codes = similex(@strings); # set value to be returned for strings without a similex code $similex_code = ' ';
The similex code is used to compare strings that are visually equivalent, character sequences that resemble each other.
Using in your code:
$code = similex('Novis'); # $code contains '54C38' @codes = similex(qw(Linux MacOSX)); # @codes contains '3541', '521481'
linux, |imux -> 3541 CISCO, C15CO, ciscu -> 13814 gandalf, ganda1f, gggandalf -> B25A231
Probably two things:
o Define a fixed code length as of Soundex. Which value should be confortable ? o More study of the algorithm. Should 's' be equivalent to 'z' ? But 'z' is not like '5'. :/ Different behaviour with upper and lower case letters.
Of course Text::Soundex. The String::Similarity calculates a similarity fuzzy value of two strings. The String::Approx let's you match and substitute strings approximately.
Paulo A Ferreira <email@example.com>
Please send any suggestion. This implementation follow the structure of Text::Soundex. It sounded nice.
Copyright 2003 by Paulo A Ferreira
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install String::Similex, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install String::Similex
For more information on module installation, please visit the detailed CPAN module installation guide.