{"name":"hunspell-reader","version":"5.12.2","keywords":["Hunspell"],"author":{"name":"Jason Dent"},"license":"MIT","_id":"hunspell-reader@5.12.2","homepage":"https://github.com/Jason-Rev/hunspell-reader#readme","bugs":{"url":"https://github.com/Jason-Rev/hunspell-reader/issues"},"bin":{"hunspell-reader":"bin.js"},"dist":{"shasum":"01877520f4df949d5d3e6a0205d9a271096bd735","tarball":"http://registry-npm.ywwl.com/hunspell-reader/download/hunspell-reader-5.12.2.tgz","fileCount":24,"integrity":"sha512-TIaMdbgit4yxpQ6h9wTU1MQjs8LFJglDcR0ELY6YupqHBE3u07A9SQNhlaF0IGgxAd4CXg8C0MaOCKIK9HK+yg==","signatures":[{"sig":"MEQCIGk3EO8BFuWdZbFRfcsLXPM6QOtnIvp4evnposCTOnHcAiBGx5DDTck+iD+L3c4863g9wxRtSzzWzwd3ZWacHC8gXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56713,"size":15827,"noattachment":false,"key":"/hunspell-reader/-/hunspell-reader-5.12.2.tgz"},"main":"dist/index.js","engines":{"node":">=12.13.0"},"gitHead":"1418785bb9c3a29b794a6e9d447b5638f8eb9fbf","scripts":{"lint":"prettier -w \"**/*.{md,yaml,yml,json,ts}\"","test":"npm run test-unit","build":"tsc -p .","clean":"rimraf dist coverage .tsbuildinfo","watch":"tsc -w","coverage":"jest --coverage","build-dev":"tsc -p tsconfig.dev.json","test-unit":"jest","smoke-test":"../bin.js words ./dictionaries/nl -n 100","test-spelling":"cspell \"src/**/*.ts\" \"*.md\"","prepublishOnly":"npm run test"},"typings":"dist/index.d.ts","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"repository":{"url":"git+https://github.com/Jason-Rev/hunspell-reader.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (darwin)","description":"A library for reading Hunspell Dictionary Files","directories":{},"_nodeVersion":"14.17.0","dependencies":{"fs-extra":"^10.0.0","commander":"^8.2.0","iconv-lite":"^0.6.3","gensequence":"^3.1.1"},"eslintConfig":{"env":{"node":true,"mocha":true},"root":true,"rules":{},"parserOptions":{"sourceType":"module","ecmaVersion":6},"ignorePatterns":["dist/**","node_modules/**"]},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.2.4","rimraf":"^3.0.2","ts-jest":"^27.0.5","prettier":"^2.4.1","typescript":"^4.4.3","@types/jest":"^27.0.2","@types/node":"^16.10.3","@types/fs-extra":"^9.0.13"},"_npmOperationalInternal":{"tmp":"tmp/hunspell-reader_5.12.2_1633531244832_0.7585185877544423","host":"s3://npm-registry-packages"},"readme":"# hunspell-reader\n\n[![Build Status](https://travis-ci.org/streetsidesoftware/hunspell-reader.svg?branch=master)](https://travis-ci.org/streetsidesoftware/hunspell-reader)\n\nA library for reading Hunspell Dictionary files\n\n## Application\n\nThis reader can be used as a tool for converting Hunspell files into a simple text file\nwith one word per line.\n\n### Installation\n\n```\nnpm install -g hunspell-reader\n```\n\n### Usage\n\nIt has basic command line help.\n\n```\nhunspell-reader words --help\n```\n\nOutputs:\n\n```\n\n  Usage: words [options] <hunspell_dic_file>\n\n  Output all the words in the <hunspell.dic> file.\n\n  Options:\n\n    -h, --help           output usage information\n    -o, --output <file>  output file - defaults to stdout\n    -s, --sort           sort the list of words\n    -u, --unique         make sure the words are unique.\n    -i, --ignore_case    used with --unique and --sort\n    -l, --lower_case     output in lower case\n    -T, --no-transform   Do not apply the prefix and suffix transforms.  Root words only.\n\n```\n\n### Converting Hunspell to word list\n\nTo convert a Hunspell dictionary to a word list, you will need both the `.dic` and `.aff` files.\nFor example en_US comes with two files: `en_US.dic` and `en_US.aff`.\nThis tool assumes they are both in the same directory.\n\nAssuming these files are in the current directory, the following command will write the words\nto `en_US.txt`.\n\n```\nhunspell-reader words ./en_US.dic -o en_US.txt\n```\n\n## Library Functions\n\n### Installation\n\n```\ninstall -S hunspell-reader rxjs\n```\n\nNote: the reader uses rxjs 5.0.\n\n### Usage\n\nTypescript / Javascript:\n\n```typescript\nimport { HunspellReader } from 'hunspell-reader';\n\nconst baseFile = 'en_US';\nconst dicFile = baseFile + '.dic';\nconst affFile = baseFile + '.aff';\n\n// Initialize the reader with the Hunspell files\nconst reader = new HunspellReader(affFile, dicFile);\n\n// Get the words as an array\nconst promiseArrayOfWords = reader.readWords().toArray().toPromise();\n```\n\n## Reference\n\n- [Hunspell Docs](https://github.com/hunspell/hunspell/blob/master/docs/hunspell.5.md)\n\n## CSpell for Enterprise\n\n<!--- @@inject: ../../static/tidelift.md --->\n\nAvailable as part of the Tidelift Subscription.\n\nThe 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.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n<!--- @@inject-end: ../../static/tidelift.md --->\n\n<!--- @@inject: ../../static/footer.md --->\n\n<br/>\n\n---\n\n<p align=\"center\">Brought to you by<a href=\"https://streetsidesoftware.com\" title=\"Street Side Software\"><img width=\"16\" alt=\"Street Side Software Logo\" src=\"https://i.imgur.com/CyduuVY.png\" /> Street Side Software</a></p>\n\n<!--- @@inject-end: ../../static/footer.md --->\n","publish_time":1633531245016,"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"_cnpm_publish_time":1633531245016,"dist-tags":{"cspell5":"5.21.2","cspell5-next":"5.21.2-alpha.0","latest":"10.4.1","next":"10.4.0-alpha.1"}}