Coder Social home page Coder Social logo

Comments (4)

mammothb avatar mammothb commented on August 25, 2024

This is expected behavior, since the input contains capital letters, it prevents lookup from exiting early with an exact match (latex). And although, latex is found in the dictionary, the frequency of la (157960401) is much higher than the frequency of latex (10502825), Latex is split into La and tex.

If you pass in latexequation123 with max_edit_distance=0, the output will be latex equation 123 as expected.

from symspellpy.

farleylai avatar farleylai commented on August 25, 2024

Thanks for the clarification.
Setting max_edit_distance to 1 gives the desirable results in lower cases.
However, in this Camel case, the actual expectation is to ignore the edit distance introduced by the capital letter for a case insensitive match.
This feels somewhat different from increasing the max_edit_distance by one.
Is there an option for this that retains the original case without adding capitalized words to the dictionary?

from symspellpy.

mammothb avatar mammothb commented on August 25, 2024

Currently there is no such option, the original author has suggested a possible solution but has not implemented it in the original code. I am not sure how to implement this in the current code.

from symspellpy.

farleylai avatar farleylai commented on August 25, 2024

Alright, it seems like lowering the case beforehand and capitalizing later could be the workaround for now.

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.