Git Product home page Git Product logo

Comments (3)

FrankDataAnalystPython avatar FrankDataAnalystPython commented on July 26, 2024

Dear Sir:
I am also wondering, is there a way to just focus on a subset of the symspell.words for calculating the distance? Many Thanks

Regards

from symspellpy.

mammothb avatar mammothb commented on July 26, 2024

I am just wondering is there a way to empty the .words dict quickly in an inexpensive way after loading dictionary.

I am facing a case where I need to constantly update the dictionary of the symspell, but it is very slow for each initialization

The words and other related data are found within these member variables and are implemented as dictionary. So I think you can probably just use the Python built-in dictionary clear() function.

I am also wondering, is there a way to just focus on a subset of the symspell.words for calculating the distance?

You'll have to write your custom functions/methods for this. You can perhaps try to load a subset of the dictionary words before running lookup methods.

To make switching of different dictionary "subset" quicker, I think you can save the words and related member variables as pickles and then just load them instead of having to parse them again. You can refer to the _load_pickle_stream() method to see which member variables should be saved and loaded

from symspellpy.

FrankDataAnalystPython avatar FrankDataAnalystPython commented on July 26, 2024

Many Thanks!!!

from symspellpy.

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.