text-processing/text-utils/test-spellchecker.js
Lilith 8ece65a893 Initial import of text-processing packages
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>
2025-12-25 13:50:30 -08:00

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);