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

Remove an entry? #106

Open
NickStrupat opened this issue Feb 27, 2021 · 1 comment
Open

Remove an entry? #106

NickStrupat opened this issue Feb 27, 2021 · 1 comment

Comments

@NickStrupat
Copy link

Is there a way to remove an entry? I don't see one, but maybe I'm missing it.

@wolfgarbe
Copy link
Owner

wolfgarbe commented Feb 28, 2021

There is currently no "RemoveDictionaryEntry" (as equivalent to CreateDictionaryEntry) to programmatically remove a term from the dictionary. It would have to be similar to CreateDictionaryEntry:

  1. Remove the term from the words list https://github.com/wolfgarbe/SymSpell/blob/master/SymSpell/SymSpell.cs#L220
  2. Create all deletes from the term https://github.com/wolfgarbe/SymSpell/blob/master/SymSpell/SymSpell.cs#L228
  3. Iterate all deletes and remove the term from their suggestions https://github.com/wolfgarbe/SymSpell/blob/master/SymSpell/SymSpell.cs#L237

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

2 participants