Giter Club home page Giter Club logo

Comments (6)

viig99 avatar viig99 commented on June 14, 2024

maybe the dictionary isn't loaded, can you check it's available at the path? or it could be with some invalid character in the dictionary, not really sure of what the issue could be at this point.

from symspellcpppy.

romikforest avatar romikforest commented on June 14, 2024

Hi. Dictionary is loaded. lookup and word count work. Only lookup_compound is not working.

from symspellcpppy.

viig99 avatar viig99 commented on June 14, 2024

xregex r(XL("['’\\w-\\[_\\]]+"));
, '.' isn't added to the word list, you can try without it, if you need the '.' in the compound list could you please further elaborate on the use case?

from symspellcpppy.

romikforest avatar romikforest commented on June 14, 2024

It can't parse absolutely any symbols

import SymSpellCppPy
symSpell = SymSpellCppPy.SymSpell()

symSpell.load_dictionary(corpus='frequency_dictionary_en_82_765.txt', term_index=0, count_index=1, separator=" ")
print(symSpell.word_count())

terms = symSpell.lookup_compound("the")

result = (x.term for x in terms)
print(*result)
python t2.py
82834
Traceback (most recent call last):
  File "/Users/romik/Work/swo/Release3/spellers/t2.py", line 7, in <module>
    terms = symSpell.lookup_compound("the")
RuntimeError: The expression contained an invalid character range, such as [b-a] in most encodings.

starting from the empty string. neither bytecode or anything

from symspellcpppy.

romikforest avatar romikforest commented on June 14, 2024

Should be a difference between compilers.

from symspellcpppy.

andreimrd avatar andreimrd commented on June 14, 2024

Had the same issue, it's because of the "-" in the sequence xregex r(XL("['’\\w-\\[_\\]]+"));
It thinks there should be a range as in [a-b] or [0-9] but the characters to the left and right are invalid. Removing the dash or properly escaping it should fix the problem.

from symspellcpppy.

Related Issues (7)

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.