Git Product home page Git Product logo

Comments (6)

maxbachmann avatar maxbachmann commented on June 8, 2024

What's the version of Levenshtein you are using?

import Levenshtein
print(Levenshtein.__version__)

from levenshtein.

ViennaMike avatar ViennaMike commented on June 8, 2024

It looks like Conda has an older version, 0.12.2. And at least with that version,, the version property also seems to be missing.

print(Levenshtein.version)
Traceback (most recent call last):

File "C:\Users\mikem\AppData\Local\Temp\ipykernel_16292\3385038131.py", line 1, in
print(Levenshtein.version)

AttributeError: module 'Levenshtein' has no attribute 'version'

from levenshtein.

maxbachmann avatar maxbachmann commented on June 8, 2024

The current version is available on conda: https://anaconda.org/conda-forge/levenshtein, so you should be able to upgrade

from levenshtein.

ViennaMike avatar ViennaMike commented on June 8, 2024

from levenshtein.

maxbachmann avatar maxbachmann commented on June 8, 2024

When processing large amounts of data you should try to use rapidfuzz directly:

from rapidfuzz.distance import Indel
from rapidfuzz import process

process.cdist(queries, choices, scorer=Indel.normalized_similarity, score_cutoff=score_cutoff, workers=-1)

It saves some overhead by reducing calls into Python, uses SIMD to compare multiple sequences in parallel when possible and allows the use of multiple threads (workers argument).

from levenshtein.

ViennaMike avatar ViennaMike commented on June 8, 2024

from levenshtein.

Related Issues (20)

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.