[bug #49375] pkg name similarity measurement is off / too simplistic

Andreas Bertsatos <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #7, bug #49375 (group octave):

There is also a compiled oct function in statistics, named *editDistance*,
which computes Levenshtein distance and could be used to quickly return a
distance vector from an arbitrary string to the names of known packages.

With the current implementation (Octave 11.0.92), the similarity measurement
is happening in *get_pkg_info.m* using the following function

## Try a simplistic method to determine similar names.
    function d = fdist (x)

      len1 = numel (name);
      len2 = numel (x);
      lo = min (len1, len2);
      excess = max (len1, len2) - lo;
      d = sum (abs (lower (name(1:lo)) - lower (x(1:lo)))) + excess * 23;

    endfunction




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?49375>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaZHT1QAKCRCqLAuaBUf3
Tp2DAQCdyds2gCZjzr/M6goy4pBjLyAvYvIAk/n2BQJ5vpsZcgEAlwbc8E+Us1JK
DwQmAwf67HR7gkDHptrJVgzGMNePKA4=
=LhwD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.