wordnet-db is a specialized Node.js package designed to provide the complete database files for WordNet 3.1 directly within an npm installation. Currently at version 3.1.14, it offers a robust solution for developers requiring offline access to the Princeton WordNet lexical database, which is particularly useful for natural language processing libraries like `wordpos` and `natural`. The package differentiates itself by pre-bundling the entire 34 MB uncompressed WordNet dictionary, eliminating the need for on-demand downloads or complex setup scripts during application runtime. Its release cadence is primarily reactive, addressing compatibility with newer Node.js versions, fixing installation-related issues, or updating to newer WordNet database versions (though it has been stable on WordNet 3.1 for a while). This ensures that applications can deploy with a guaranteed, self-contained WordNet data source, even in environments with restricted internet access.
npm install wordnet-dbVerified import paths — ran on the pinned version, not inferred.
This script demonstrates how to import `wordnet-db`, access its properties (like path and versions), and verify the presence and content of a sample WordNet data file.
Update `package.json` dependencies and all `require()` statements from `WNdb` to `wordnet-db`.
Ensure your Node.js environment is version 0.6.0 or higher. For modern applications, use the latest LTS Node.js release.
No direct fix needed for newer versions, as it simplifies installation. If you encounter `tar` related errors on older versions, upgrade to `wordnet-db@^3.1.13`.
Before cloning the repository on Windows for version 3.0.0, execute `git config core.autocrlf false` to prevent CRLF conversions that can damage data files.
If experiencing installation issues with `npm@5` on older versions, upgrade to `wordnet-db@^3.1.6` or later.
Upgrade to `wordnet-db@^3.1.13` to use the version where `tar` is no longer a dependency and dictionary files are directly bundled.
For version `3.0.0` specifically, ensure `git config core.autocrlf false` is set before cloning the repository. For later versions (3.1.x), this issue is largely mitigated by how files are packaged.
No dependency data recorded yet.