Security News
Supply Chain Attack Detected in @solana/web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
hunspell-reader
Advanced tools
A library for reading Hunspell Dictionary files
This reader can be used as a tool for converting Hunspell files into a simple text file with one word per line.
npm install -g hunspell-reader
It has basic command line help.
hunspell-reader words --help
Outputs:
Usage: words [options] <hunspell_dic_file>
Output all the words in the <hunspell.dic> file.
Options:
-h, --help output usage information
-o, --output <file> output file - defaults to stdout
-s, --sort sort the list of words
-u, --unique make sure the words are unique.
-i, --ignore_case used with --unique and --sort
-l, --lower_case output in lower case
-T, --no-transform Do not apply the prefix and suffix transforms. Root words only.
To convert a Hunspell dictionary to a word list, you will need both the .dic
and .aff
files.
For example en_US comes with two files: en_US.dic
and en_US.aff
.
This tool assumes they are both in the same directory.
Assuming these files are in the current directory, the following command will write the words
to en_US.txt
.
hunspell-reader words ./en_US.dic -o en_US.txt
install -S hunspell-reader rxjs
Note: the reader uses rxjs 5.0.
Typescript / Javascript:
import { HunspellReader } from 'hunspell-reader';
const baseFile = 'en_US';
const dicFile = baseFile + '.dic';
const affFile = baseFile + '.aff';
// Initialize the reader with the Hunspell files
const reader = new HunspellReader(affFile, dicFile);
// Get the words as an array
const promiseArrayOfWords = reader.readWords().toArray().toPromise();
Available as part of the Tidelift Subscription.
The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. Learn more.
Brought to you by Street Side Software
FAQs
A library for reading Hunspell Dictionary Files
The npm package hunspell-reader receives a total of 690 weekly downloads. As such, hunspell-reader popularity was classified as not popular.
We found that hunspell-reader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.