-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi Team,
My requirements are,
- Add the words to a custom dictionary instead of a runtime dictionary. So I can share my custom dictionary with other users. As per API specification, I could not find this feature so could you please confirm if huspell-asm provides the same?
- I can use the spellcheck instance after unmounting and disposing of.
const aff = await fetch('assets/dictionaries/en_US.aff');
const affBuffer = new Uint8Array(await aff.arrayBuffer());
const affFile = hunspellFactory.mountBuffer(affBuffer, 'english.aff');
const dic = await fetch('assets/dictionaries/en_US.dic');
const dicBuffer = new Uint8Array(await dic.arrayBuffer());
const dictFile = hunspellFactory.mountBuffer(dicBuffer, "english.dic");
const hunspell = hunspellFactory.create(affFile, dictFile);
const test1 = hunspell.spell('hello'); // give me true
hunspellFactory.unmount('assets/dictionaries/en_US.aff');
hunspellFactory.unmount('assets/dictionaries/en_US.dic');
hunspell.dispose();
// Suppose to throw error while giving me true
const test2 = hunspell.spell('hello'); // give me true
Metadata
Metadata
Assignees
Labels
No labels