Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a frequency file/dictionary file #4

Open
ndvbd opened this issue Feb 27, 2018 · 3 comments
Open

How to add a frequency file/dictionary file #4

ndvbd opened this issue Feb 27, 2018 · 3 comments

Comments

@ndvbd
Copy link

ndvbd commented Feb 27, 2018

How to use this package?
How to add the dictionary/frequency file like here: https://github.com/wolfgarbe/SymSpell ?
Thanks.

@zacniewski
Copy link

symspell::SymSpell symSpell;
char* corpus = (char*)"/full/patht/to/frequency_dictionary_en_82_765.txt";
symSpell.LoadDictionary(corpus, 0, 1);

// LoadDictionary() returns a bool, so you can check if the file is loaded.

@VJAYSLN
Copy link

VJAYSLN commented Oct 1, 2019

BTW, I try to load dictionary using your method..But it always displays freq_count as zero.. can u help??
Thanks in advance..

symspell::SymSpell symSpell;
char* corpus = (char*)"/full/patht/to/frequency_dictionary_en_82_765.txt";
symSpell.LoadDictionary(corpus, 0, 1);

// LoadDictionary() returns a bool, so you can check if the file is loaded.

@zacniewski
Copy link

zacniewski commented Oct 4, 2019

Some explanation is here: https://stackoverflow.com/questions/56394962/wordsegmentation-in-symspellplusplus/56395677#56395677
Our team decided to use Python version with help of Python/C API: https://docs.python.org/3/c-api/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants