Lindera is a high-performance Rust-based morphological analysis library, compiled to WebAssembly (WASM) for use in JavaScript environments. This specific package, `lindera-wasm-cc-cedict-bundler`, provides Chinese morphological analysis capabilities utilizing the comprehensive CC-CEDICT dictionary. It is specifically designed and optimized for integration with JavaScript bundlers like Webpack, Rollup, or Vite, facilitating efficient tokenization and detailed linguistic analysis of Chinese text directly within web applications. The Lindera project generally maintains a regular release cadence, with major updates often reflecting enhancements in the core Rust library, improvements in WASM compilation targets, or dictionary updates. Key differentiators include its performance due to the WASM architecture, the availability of specialized dictionary sets via distinct npm packages, and a consistent API across different language analysis modules. Version 3.0.5 is the current stable release, offering robust and safe dictionary deserialization.
npm install lindera-wasm-cc-cedict-bundlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize the WASM module, configure a tokenizer for Chinese with CC-CEDICT, and tokenize a sample Chinese sentence.
Review release notes for v3.0.0 and subsequent v3.x releases. Ensure error handling aligns with new propagation mechanisms. Verify dictionary loading and tokenization behavior in your application.
Always call `await __wbg_init();` at the beginning of your application's entry point or before interacting with `TokenizerBuilder` and other library functions.
Prefer `import ... from 'lindera-wasm-cc-cedict-bundler'` syntax. Ensure your bundler is configured to handle WASM modules and ESM correctly.
Verify the dictionary identifier string matches the bundled dictionary, which for this package is `embedded://cc-cedict`.
Ensure `await __wbg_init();` is executed at the start of your application, usually in an async IIFE or your main setup function.
Confirm `await __wbg_init();` has finished. Verify `import { TokenizerBuilder } from 'lindera-wasm-cc-cedict-bundler';` for correct named import.Change the dictionary setting to `builder.setDictionary("embedded://cc-cedict");` to use the correct bundled dictionary.Refactor your imports to use ES Modules syntax: `import ... from 'lindera-wasm-cc-cedict-bundler';`.
No dependency data recorded yet.