hunspell-reader
A library for reading Hunspell Dictionary Files
Last updated 8 years ago by jason-dent .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install hunspell-reader 
SYNC missed versions from official npm registry.

hunspell-reader

Build Status

A library for reading Hunspell Dictionary files

Application

This reader can be used as a tool for converting Hunspell files into a simple text file with one word per line.

Installation

npm install -g hunspell-reader

Usage

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.

Converting Hunspell to word list

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

Library Functions

Installation

install -S hunspell-reader rxjs

Note: the reader uses rxjs 5.0.

Usage

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

Reference

CSpell for Enterprise

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 Logo Street Side Software

Current Tags

  • 5.21.2                                ...           cspell5 (3 years ago)
  • 5.21.2-alpha.0                                ...           cspell5-next (3 years ago)
  • 7.3.6                                ...           latest (a year ago)
  • 7.0.1-alpha.9                                ...           next (a year ago)

175 Versions

  • 7.3.6                                ...           a year ago
  • 7.3.5                                ...           a year ago
  • 7.3.4                                ...           a year ago
  • 7.3.3                                ...           a year ago
  • 7.3.2                                ...           a year ago
  • 7.3.1                                ...           a year ago
  • 7.3.0                                ...           a year ago
  • 7.2.0                                ...           a year ago
  • 7.1.1                                ...           a year ago
  • 7.0.2                                ...           a year ago
  • 7.0.1                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 7.0.1-alpha.9                                ...           a year ago
  • 6.31.3                                ...           a year ago
  • 7.0.1-alpha.8                                ...           a year ago
  • 7.0.1-alpha.7                                ...           a year ago
  • 6.31.2                                ...           a year ago
  • 7.0.1-alpha.6                                ...           a year ago
  • 7.0.1-alpha.5                                ...           a year ago
  • 7.0.1-alpha.4                                ...           a year ago
  • 7.0.1-alpha.3                                ...           a year ago
  • 7.0.1-alpha.2                                ...           a year ago
  • 7.0.1-alpha.1                                ...           a year ago
  • 7.0.1-alpha.0                                ...           2 years ago
  • 7.0.0-alpha.2                                ...           2 years ago
  • 7.0.0-alpha.1                                ...           2 years ago
  • 6.31.1                                ...           2 years ago
  • 6.31.0                                ...           2 years ago
  • 6.30.2                                ...           2 years ago
  • 6.30.1                                ...           2 years ago
  • 6.30.0                                ...           2 years ago
  • 6.29.3                                ...           2 years ago
  • 6.29.2                                ...           2 years ago
  • 6.29.1                                ...           2 years ago
  • 6.29.0                                ...           2 years ago
  • 6.28.0                                ...           2 years ago
  • 6.27.0                                ...           2 years ago
  • 6.26.3                                ...           2 years ago
  • 6.26.2                                ...           2 years ago
  • 6.26.1                                ...           2 years ago
  • 6.26.0                                ...           2 years ago
  • 6.25.0                                ...           2 years ago
  • 6.24.0                                ...           2 years ago
  • 6.23.1                                ...           2 years ago
  • 6.23.0                                ...           2 years ago
  • 6.22.0                                ...           2 years ago
  • 6.21.0                                ...           2 years ago
  • 6.20.1                                ...           2 years ago
  • 6.20.0                                ...           2 years ago
  • 6.19.2                                ...           2 years ago
  • 6.19.1                                ...           2 years ago
  • 6.19.0                                ...           2 years ago
  • 6.18.1                                ...           2 years ago
  • 6.18.0                                ...           2 years ago
  • 6.17.0                                ...           2 years ago
  • 6.16.0                                ...           2 years ago
  • 6.15.1                                ...           2 years ago
  • 6.15.0                                ...           2 years ago
  • 6.14.3                                ...           2 years ago
  • 6.14.2                                ...           2 years ago
  • 6.14.1                                ...           2 years ago
  • 6.14.0                                ...           2 years ago
  • 6.13.3                                ...           2 years ago
  • 6.13.2                                ...           2 years ago
  • 6.13.1                                ...           2 years ago
  • 6.13.0                                ...           2 years ago
  • 6.12.0                                ...           2 years ago
  • 6.11.1                                ...           2 years ago
  • 6.11.0                                ...           2 years ago
  • 6.10.1                                ...           2 years ago
  • 6.10.0                                ...           2 years ago
  • 6.9.1                                ...           2 years ago
  • 6.9.0                                ...           2 years ago
  • 6.8.2                                ...           2 years ago
  • 6.8.1                                ...           2 years ago
  • 6.8.0                                ...           2 years ago
  • 6.7.0                                ...           2 years ago
  • 6.6.1                                ...           2 years ago
  • 6.6.1-alpha.9                                ...           2 years ago
  • 6.6.1-alpha.2                                ...           2 years ago
  • 6.6.1-alpha.0                                ...           2 years ago
  • 6.6.0                                ...           2 years ago
  • 6.4.2                                ...           2 years ago
  • 6.4.1                                ...           2 years ago
  • 6.4.0                                ...           2 years ago
  • 6.4.0-alpha.0                                ...           2 years ago
  • 6.3.0                                ...           2 years ago
  • 6.2.4-alpha.0                                ...           2 years ago
  • 6.2.3                                ...           2 years ago
  • 6.2.2                                ...           2 years ago
  • 6.2.0                                ...           2 years ago
  • 6.2.0-alpha.1                                ...           2 years ago
  • 6.1.3                                ...           2 years ago
  • 6.1.3-alpha.1                                ...           2 years ago
  • 6.1.3-alpha.0                                ...           2 years ago
  • 6.1.2                                ...           3 years ago
  • 6.1.1                                ...           3 years ago
  • 6.1.0                                ...           3 years ago
  • 6.1.0-alpha.0                                ...           3 years ago
  • 5.21.2                                ...           3 years ago
  • 6.0.0                                ...           3 years ago
  • 5.21.2-alpha.0                                ...           3 years ago
  • 6.0.0-alpha.0                                ...           3 years ago
  • 5.21.1                                ...           3 years ago
  • 5.21.0                                ...           3 years ago
  • 5.20.0                                ...           3 years ago
  • 5.19.7                                ...           3 years ago
  • 5.19.6                                ...           3 years ago
  • 5.19.5                                ...           3 years ago
  • 5.19.4                                ...           3 years ago
  • 5.19.3                                ...           3 years ago
  • 5.19.2                                ...           3 years ago
  • 5.19.1                                ...           3 years ago
  • 5.19.0                                ...           3 years ago
  • 5.18.5                                ...           3 years ago
  • 5.18.4                                ...           3 years ago
  • 5.18.3                                ...           3 years ago
  • 5.18.2                                ...           3 years ago
  • 5.18.1                                ...           3 years ago
  • 5.18.0                                ...           3 years ago
  • 5.18.0-alpha.0                                ...           3 years ago
  • 5.17.0                                ...           3 years ago
  • 5.17.0-alpha.0                                ...           3 years ago
  • 5.16.0                                ...           3 years ago
  • 5.15.3                                ...           3 years ago
  • 5.15.2                                ...           3 years ago
  • 5.15.1                                ...           3 years ago
  • 5.15.0                                ...           3 years ago
  • 5.14.0                                ...           3 years ago
  • 5.14.0-alpha.0                                ...           3 years ago
  • 5.13.4                                ...           3 years ago
  • 5.13.3                                ...           3 years ago
  • 5.13.2                                ...           3 years ago
  • 5.13.1                                ...           3 years ago
  • 5.13.0                                ...           3 years ago
  • 5.12.6                                ...           3 years ago
  • 5.12.5                                ...           3 years ago
  • 5.12.4                                ...           3 years ago
  • 5.12.3                                ...           3 years ago
  • 5.12.2                                ...           3 years ago
  • 5.12.0                                ...           3 years ago
  • 5.12.0-alpha.0                                ...           3 years ago
  • 5.11.1                                ...           3 years ago
  • 5.11.0                                ...           3 years ago
  • 5.11.0-alpha.0                                ...           3 years ago
  • 5.10.0                                ...           3 years ago
  • 5.10.0-alpha.6                                ...           3 years ago
  • 5.10.0-alpha.3                                ...           3 years ago
  • 5.10.0-alpha.2                                ...           3 years ago
  • 5.9.1                                ...           3 years ago
  • 5.9.1-alpha.1                                ...           3 years ago
  • 5.9.0                                ...           3 years ago
  • 5.9.0-alpha.0                                ...           3 years ago
  • 4.0.0                                ...           4 years ago
  • 3.2.0                                ...           5 years ago
  • 3.1.5                                ...           5 years ago
  • 3.1.4                                ...           5 years ago
  • 3.1.3                                ...           5 years ago
  • 3.1.2                                ...           5 years ago
  • 3.1.1                                ...           5 years ago
  • 3.0.1                                ...           6 years ago
  • 2.1.2                                ...           6 years ago
  • 2.1.1                                ...           6 years ago
  • 2.1.0                                ...           6 years ago
  • 2.0.4                                ...           6 years ago
  • 2.0.3                                ...           7 years ago
  • 2.0.2                                ...           7 years ago
  • 2.0.1                                ...           7 years ago
  • 1.2.1                                ...           8 years ago
  • 1.2.0                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 46
Last Day 0
Last Week 46
Last Month 0
Dependencies (9)
Dev Dependencies (9)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |