Coder Social home page Coder Social logo

text--levenshtein--xs's People

Contributors

karenetheridge avatar ugexe avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

karenetheridge

text--levenshtein--xs's Issues

Third parameter still not working properly

Now using version 0.501 of Text::Levenshtein::XS from CPAN.
The fix for #10 leads to the correct result when using:

distance('ACGTAG', 'AGTAG', 2) # returns 1 

But if the cut-off is the same as the result the bug still occurs:

distance('ACGTAG', 'AGTAG', 1) # should be 1 is undef 

Third parameter does not seem to work properly

I use Text::Levenshtein::XS on Ubuntu 15.04 (64bit) installed via CPAN:

cpan[1]> i Text::Levenshtein::XS
Going to read '/home/markus/.cpan/Metadata'
  Database was generated on Thu, 27 Aug 2015 15:41:02 GMT
Module id = Text::Levenshtein::XS
    CPAN_USERID  UGEXE (Nick Logan <[email protected]>)
    CPAN_VERSION 0.43
    CPAN_FILE    U/UG/UGEXE/Text-Levenshtein-XS-0.43.tar.gz
    UPLOAD_DATE  2014-10-15
    MANPAGE      Text::Levenshtein::XS - Calculate edit distance based on insertion, deletion, substitution, and transposition
    INST_FILE    /home/markus/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Text/Levenshtein/XS.pm
    INST_VERSION 0.43

When passing a third parameter to the distance function there are two kinds of unexpected behaviour:

  1. distance is smaller than cut-off and the result is still not reported, eg:
   distance('ACGTAG', 'AGTAG', 2) # should be 1 is undef 
  1. distance is larger than cut-off and the result is still returned, eg:
   distance('ACGTAG', 'TCGG', 2) # is 3 should be undef

Unfortunately I could not verify that this problem still exists in version 0.46 on GitHub as I was unable to compile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.