Code Monkey home page Code Monkey logo

Comments (5)

wolfgarbe avatar wolfgarbe commented on May 18, 2024

WordSegmentation vs. LookupCompound

LookupCompound can insert only a single space into a token (string fragment separated by existing spaces). It is intended for spelling correction of word segmented text but can fix an occasional missing space. There are fewer variants to generate and evaluate because of the single space restriction per token. Therefore it is faster and the quality of the correction is usually better.

WordSegmentation can insert as many spaces as required into a token. Therefore it is suitable also for long strings without any space. The drawback is a slower speed and correction quality, as many more potential variants exist, which need to be generated, evaluated and chosen from.

from symspell.

nagavardhan1 avatar nagavardhan1 commented on May 18, 2024

Is there a way I can increase it to 2 spaces instead of one?

from symspell.

aashish-amber-abz avatar aashish-amber-abz commented on May 18, 2024

@wolfgarbe I can't find any port in python for WordSegmentation, all the ports listed by you on the read me page is for LookupCompound. Do you know any port for WordSegmentation in python ?

from symspell.

wolfgarbe avatar wolfgarbe commented on May 18, 2024

@aashish-amber-abz No, I don't know a Python port of SymSpell which includes WordSegmentation.
But there are other word segmentation approaches in Python available (word segmentation only, without spelling correction) e.g.: https://github.com/grantjenks/python-wordsegment

from symspell.

wolfgarbe avatar wolfgarbe commented on May 18, 2024

@nagavardhan1 There is no easy way to increase the number of spaces for LookupCompound (for performance reasons). The algorithm requires significant modification. The modified algorithm, which can deal with a unlimited number of spaces to be inserted is called WordSegmentation. Please note, that it can still correct spelling errors.

from symspell.

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.