Skip to content

Latest commit

 

History

History
119 lines (89 loc) · 6.65 KB

File metadata and controls

119 lines (89 loc) · 6.65 KB

Changes

1.10.1 (2026-03-19)

  • Remove max_distance parameter from normalized_damerau_levenshtein_distance and normalized_damerau_levenshtein_distance_seqs. The parameter was a leaky abstraction: the return value when the threshold was exceeded was neither a consistent sentinel nor the true normalized distance, and varied with sequence length.

1.10.0 (2026-03-17)

  • Add max_distance parameter to all four functions. When provided, computation terminates early and max_distance + 1 (or a value greater than max_distance for normalized functions) is returned if the true distance exceeds the threshold. Closes #16.
  • Note: normalized distance functions now return a 64-bit float (Python's native float) instead of a 32-bit C float. Return values are now more precise (e.g., 0.2 instead of 0.20000000298023224). Code that relies on exact float32 values may need to be updated.
  • Raise TypeError with a clear message when None is passed as an input sequence; previously, None inputs were not explicitly handled.
  • Update type stubs (__init__.pyi) with modern typing syntax and max_distance parameters.
  • Migrate CI from Travis CI to GitHub Actions.
  • Modernize pyproject.toml with full PEP 621 metadata.
  • Add Python 3.14 support.

1.9.0 (2025-07-29)

  • Add Python wheel support (#8). (courtesy @jianlins)
  • Drop Python 3.8 support.

1.8.0 (2024-05-02)

  • Add Cython to the build process to reduce the likelihood of incompatabilities between the Cython-generated C code and CPython (#38). (courtesy @tacaswell)
  • Drop Python 3.7 support.
  • Add Python 3.11-3.13 support.

1.7.1 (2022-08-01)

  • Drop Python 3.6 support (EOL).
  • Add Python 3.10 support.
  • Compiled with Cython 0.29.32.
  • Updating project URL (moved from @gfairchild's personal namespace to @lanl's namespace).

1.7.0 (2021-02-09)

  • Remove NumPy dependency to simplify build process. Rather than relying on np.ndarray, we'll now use native iterables like list or tuple.
    • This is a breaking change if you currently rely on either of the *_ndarray methods.
      • damerau_levenshtein_distance_ndarray refactored to damerau_levenshtein_distance_seqs, and the return value is now a list rather than np.array
      • normalized_damerau_levenshtein_distance_ndarray refactored to normalized_damerau_levenshtein_distance_seqs, and the return value is now a list rather than np.array
    • The simplest way to migrate to these new methods is to switch to using a native Python list. For example:
      • damerau_levenshtein_distance_ndarray('test', np.array(['test1', 't1', 'test'])) is now damerau_levenshtein_distance_seqs('test', ['test1', 't1', 'test'])
      • normalized_damerau_levenshtein_distance_ndarray('test', np.array(['test1', 't1', 'test'])) is now normalized_damerau_levenshtein_distance_seqs('test', ['test1', 't1', 'test'])
      • If you need the return value to be an np.array, then you can simply wrap the return value (a list) with np.array like so:
        • np.array(damerau_levenshtein_distance_seqs('test', ['test1', 't1', 'test']))
  • Compiled with Cython 0.29.21.

1.6.2 (2021-02-08)

  • Remove Python 2 and 3.5 support (they are EOL).
  • Bump minimum NumPy version to 1.19.5.
  • Add Python 3.9 support in setup.py.
  • Compiled with Cython 0.29.21.

1.6.1 (2020-07-27)

  • Fixed bug when first string is longer than the second string (#22). (courtesy @svenski)
  • Compiled with Cython 0.29.21.
  • Dropping Python 3.4 support from Travis.

1.6.0 (2020-05-01)

  • Allow np.ndarrays as input.
  • Add support for Python 3.8 to setup.py.
  • Compiled with Cython 0.29.17.

1.5.3 (2019-02-25)

  • Specifying minimum version numbers in pyproject.toml and setup.py.
  • Compiled with Cython 0.29.5.

1.5.2 (2019-01-07)

  • Using the pyproject.toml standard set forth in PEP 518, NumPy will now be correctly installed as a dependency prior to running setup.py.

1.5.1 (2019-01-04)

  • Fixing NumPy-related install error. (courtesy @simobasso)
  • Enabling Python 3.7 unit tests in Travis.
  • Compiled with Cython 0.29.2.

1.5.0 (2018-02-04)

  • Allow tuples and lists as input. (courtesy @internaut)
  • Dropped support of EOL Python versions (2.6, 3.2, and 3.3). (courtesy @internaut)
  • Fixed a possible division-by-zero exception. (courtesy @internaut)
  • Fixed a formatting error in an exception message. (courtesy @internaut)
  • Compiled with Cython 0.27.3.

1.4.1 (2016-07-18)

  • Clarified that this implementation is of the optimal string alignment distance algorithm (see this issue for more information).
  • Renamed damerau_levenshtein_distance_withNPArray to damerau_levenshtein_distance_ndarray and normalized_damerau_levenshtein_distance_withNPArray to normalized_damerau_levenshtein_distance_ndarray.
  • Cleaned up np.ndarray type and dimension checks.
  • Simplified NumPy functions using np.vectorize.
  • Hardened unicode conversion using Cython's recommendations.
  • Compiled with Cython 0.24.1.

1.3.2 (2015-05-19)

1.3.1 (2015-04-07)

  • @ovarene added the ability to compute the edit distance between a string and each string in a NumPy array in this PR.
  • Compiled with Cython 0.22.

1.2.0 (2014-05-06)

  • Changed xrange to range in pyx code.
  • Compiled with Cython 0.20.1.

1.1.0 (2013-10-04)

  • Moving to setuptools (using ez_setup.py to manage it).

1.0.2 (2013-09-23)

  • Performance improvement for short-circuit.
  • Changed unsigned int to Py_ssize_t (for 64-bit compatability).
  • Improved readability (defined offset indices for storage).

1.0.1 (2013-09-23)

1.0.0 (2013-07-03)

  • Initial release.