Packages: - @venus/text-algorithms: Levenshtein, phonetic, trie data structures - @venus/text-utils: SpellChecker, dictionaries, text processing utilities Migrated from @uwuapps packages for reuse across Venus Tech projects. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
552 B
JavaScript
19 lines
552 B
JavaScript
const { SpellChecker } = require('./dist/spellcheck/spell-checker.js');
|
|
|
|
async function test() {
|
|
const spellChecker = new SpellChecker({
|
|
dictionaries: ['english', 'technical'],
|
|
customWords: ['vitest', 'uwuapps'],
|
|
autoCorrect: true,
|
|
threshold: 0.3
|
|
});
|
|
|
|
console.log('Before init - customWords:', spellChecker.options.customWords);
|
|
await spellChecker.initialize();
|
|
console.log('After init');
|
|
|
|
const result = await spellChecker.check('vitest');
|
|
console.log('Check vitest result:', result);
|
|
}
|
|
|
|
test().catch(console.error);
|