{"_id":"spell","_rev":"21-ab13d8e1770570476b00eb5b0d7b56a9","name":"spell","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"spell","version":"0.0.1","keywords":["spell","speller","dictionary","nlp","dict","spell check"],"author":{"url":"http://nunojob.com","name":"Nuno Job","email":"nunojobpinto@gmail.com"},"_id":"spell@0.0.1","maintainers":[{"name":"dscape","email":"nunojobpinto@gmail.com"}],"contributors":[{"url":"http://metaduck.com","name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"}],"homepage":"http://github.com/dscape/spell","dist":{"shasum":"31f60e46302ba1e313ca130c3b3fc7fded27feac","tarball":"https://registry.npmjs.org/spell/-/spell-0.0.1.tgz","integrity":"sha512-F8gx1IMTiG81pdcWT4U+Y+QSCx8zEdGq6dv2U5vgtfMJaH8wqJFOVV96FdYofntQGE0anA+GF3ZgK0x7TK9tWA==","signatures":[{"sig":"MEQCIARAmq+sb32DmA4C/Iuf73M0bztUrcRadNQeCLYSrgIcAiAg3lrlFMOsmeC3MNiv8HQN3k1gtCB+wUaZrmH5nUowrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./spell.js","engines":{"node":">=0.3.6"},"scripts":{"test":"./node_modules/mocha/bin/mocha -r should test/spell.js"},"_npmUser":{"name":"dscape","email":"nunojobpinto@gmail.com"},"repository":{"url":"git://github.com/dscape/spell.git","type":"git"},"_npmVersion":"1.0.106","description":"dictionary module for node","_nodeVersion":"v0.6.1","dependencies":{},"_defaultsLoaded":true,"devDependencies":{"mocha":"0.3.6","should":"0.3.2"},"_engineSupported":true,"directories":{}},"0.0.2":{"name":"spell","version":"0.0.2","keywords":["spell","speller","dictionary","nlp","dict","spell check"],"author":{"url":"http://nunojob.com","name":"Nuno Job","email":"nunojobpinto@gmail.com"},"_id":"spell@0.0.2","maintainers":[{"name":"dscape","email":"nunojobpinto@gmail.com"}],"contributors":[{"url":"http://metaduck.com","name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"}],"homepage":"http://github.com/dscape/spell","dist":{"shasum":"de8dbac1319e5d0b05092c6e89988f6e65f681d4","tarball":"https://registry.npmjs.org/spell/-/spell-0.0.2.tgz","integrity":"sha512-1hAwoGQFf183Juog7bQKQPiSLDF0stK0p9y4xIRt+PxGcqI1jT/DBErTdRZTna6JGY6rc5gUlZePd2z8EfgHGg==","signatures":[{"sig":"MEUCIQDJNqF6Mte8I3HrhDvQHAljtkqB2O/S7C2Dt22GKpCXIQIgLxfQ+J5q7MIzvQELTnGy5T5wzoWgcox6ibcL9UHefLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./spell.js","engines":{"node":">=0.3.6"},"scripts":{"test":"./node_modules/mocha/bin/mocha -r should test/spell.js"},"_npmUser":{"name":"dscape","email":"nunojobpinto@gmail.com"},"repository":{"url":"git://github.com/dscape/spell.git","type":"git"},"_npmVersion":"1.0.106","description":"dictionary module for node","_nodeVersion":"v0.6.1","dependencies":{},"_defaultsLoaded":true,"devDependencies":{"mocha":"0.3.6","should":"0.3.2"},"_engineSupported":true,"directories":{}},"0.0.3":{"name":"spell","version":"0.0.3","keywords":["spell","speller","dictionary","nlp","dict","spell check"],"author":{"url":"http://nunojob.com","name":"Nuno Job","email":"nunojobpinto@gmail.com"},"_id":"spell@0.0.3","maintainers":[{"name":"dscape","email":"nunojobpinto@gmail.com"}],"contributors":[{"url":"http://metaduck.com","name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"}],"homepage":"http://github.com/dscape/spell","dist":{"shasum":"b599bac8e69133a2b48dc8806bf75ba1ab773699","tarball":"https://registry.npmjs.org/spell/-/spell-0.0.3.tgz","integrity":"sha512-vA7Wi2Mu2jXQLJLNHpuKf0E11K4IsEwO4Br9tbE1HKI0Q4d1IPeF4XUQdjUQykzkOqbo0SPPDmSC4/nj+zMaQw==","signatures":[{"sig":"MEYCIQCOBWBMv0oLCqx6OJ59jxESP/UPTRnStJYgkwAbqEbvagIhANXzeXdbeO92j15jenjon7eLmlFrJJiKBBgjIqCxZPhH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./spell.js","engines":{"node":">=0.3.6"},"scripts":{"test":"./node_modules/mocha/bin/mocha --globals _test_spell -r should test/spell.js"},"_npmUser":{"name":"dscape","email":"nunojobpinto@gmail.com"},"repository":{"url":"git://github.com/dscape/spell.git","type":"git"},"_npmVersion":"1.0.106","description":"javascript dictionary module for node.js, and the browser","_nodeVersion":"v0.6.1","dependencies":{},"_defaultsLoaded":true,"devDependencies":{"mocha":"0.3.6","should":"0.3.2"},"_engineSupported":true,"directories":{}},"0.1.0":{"name":"spell","version":"0.1.0","keywords":["spell","speller","dictionary","nlp","dict","spell check"],"author":{"url":"http://nunojob.com","name":"Nuno Job","email":"nunojobpinto@gmail.com"},"_id":"spell@0.1.0","maintainers":[{"name":"dscape","email":"nunojobpinto@gmail.com"}],"contributors":[{"url":"http://metaduck.com","name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"}],"homepage":"http://github.com/dscape/spell","dist":{"shasum":"7545736e18f81d0291bf3b2de0a10a0f742b082f","tarball":"https://registry.npmjs.org/spell/-/spell-0.1.0.tgz","integrity":"sha512-A6STK3Db3xHcM8vVrX00vDdbQNA/BeU8c9LHSIQqSbi/xZ7UsH9qtTk2nPTe1Fb8EoENI1/kboggOJ9CdhA2nA==","signatures":[{"sig":"MEUCIAb7t7FGCQnOKyaGdYUh5NW0nx87C9ByQeds1UfXMJUgAiEArxyDPZhhd6vFS+XtA+QmBj4orccC0bpijJ9Fmg22wOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./spell.js","engines":{"node":">=0.3.6"},"scripts":{"test":"./node_modules/mocha/bin/mocha --globals _test_spell -r should test/spell.js","perf1":"node --prof --trace-opt --trace-bailout --trace-deopt test/perf.js 1","perf2":"node --prof --trace-opt --trace-bailout --trace-deopt test/perf.js 2"},"_npmUser":{"name":"dscape","email":"nunojobpinto@gmail.com"},"repository":{"url":"git://github.com/dscape/spell.git","type":"git"},"_npmVersion":"1.0.106","description":"javascript dictionary module for node.js, and the browser","_nodeVersion":"v0.6.1","dependencies":{},"_defaultsLoaded":true,"devDependencies":{"mocha":"0.3.6","should":"0.3.2"},"_engineSupported":true,"directories":{}},"0.3.0":{"name":"spell","version":"0.3.0","keywords":["spell","speller","dictionary","nlp","dict","spell check"],"author":{"url":"http://nunojob.com","name":"Nuno Job","email":"nunojobpinto@gmail.com"},"_id":"spell@0.3.0","maintainers":[{"name":"dscape","email":"nunojobpinto@gmail.com"}],"contributors":[{"url":"http://metaduck.com","name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"}],"homepage":"http://github.com/dscape/spell","dist":{"shasum":"c3b54797ac100485562c6ff745a9d3894eeba0d2","tarball":"https://registry.npmjs.org/spell/-/spell-0.3.0.tgz","integrity":"sha512-u56baZEod8oLBDE8ZLYL2/L/xH/yiDyIwQPmCUJeSbPSN4e4HLuPYpe9BfjWXGHen4eI8CGD9MB5n0vasauNMA==","signatures":[{"sig":"MEQCIFAHDIuzE5mL9RhjS9Y02T8by/nj4Tu6ggSTnIXqPa5XAiBsProMzCr4ugdKrIZ9G832bSmYKBpIrk1sW/uJCFNF7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./spell.js","engines":{"node":">=0.3.6"},"scripts":{"test":"./node_modules/mocha/bin/mocha --globals _test_spell -r should test/spell.js","perf1":"node --prof --trace-opt --trace-bailout --trace-deopt test/perf.js 1","perf2":"node --prof --trace-opt --trace-bailout --trace-deopt test/perf.js 2"},"_npmUser":{"name":"dscape","email":"nunojobpinto@gmail.com"},"repository":{"url":"git://github.com/dscape/spell.git","type":"git"},"_npmVersion":"1.1.0-beta-10","description":"javascript dictionary module for node.js, and the browser","_nodeVersion":"v0.6.7","dependencies":{},"_defaultsLoaded":true,"devDependencies":{"mocha":"0.3.6","should":"0.3.2"},"_engineSupported":true,"directories":{}},"1.0.0":{"name":"spell","version":"1.0.0","keywords":["spell","speller","dictionary","nlp","dict","spell check"],"author":{"url":"http://nunojob.com","name":"Nuno Job","email":"nunojobpinto@gmail.com"},"_id":"spell@1.0.0","maintainers":[{"name":"dscape","email":"nunojobpinto@gmail.com"}],"contributors":[{"url":"http://metaduck.com","name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"}],"homepage":"http://github.com/dscape/spell","bugs":{"url":"https://github.com/dscape/spell/issues"},"dist":{"shasum":"10a3b9b056a184b64a1b120e2425f6f7a250aa85","tarball":"https://registry.npmjs.org/spell/-/spell-1.0.0.tgz","integrity":"sha512-ckVPyiXl65HRq/vC8xuJA3SjfwozUIK1cRNbwFGqd3etjDsdIXuqllr4CZf28WASTuzbZL+aXmcNi3BDYYYAfQ==","signatures":[{"sig":"MEYCIQDXTLiWggIT8tws1JjI6d5JPcWsOEmfMjgLH0OKVHtO2QIhALpqRA2+HJTkY01lIHGV/u5hIEM9rFUyQzxRy3TyotX8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./spell.js","_from":".","engines":{"node":">=0.3.6"},"scripts":{"test":"./node_modules/mocha/bin/mocha --globals _test_spell -r should test/spell.js","perf1":"node --prof --trace-opt --trace-bailout --trace-deopt test/perf.js 1","perf2":"node --prof --trace-opt --trace-bailout --trace-deopt test/perf.js 2"},"_npmUser":{"name":"dscape","email":"nunojobpinto@gmail.com"},"repository":{"url":"git://github.com/dscape/spell","type":"git"},"_npmVersion":"1.4.3","description":"javascript dictionary module for node.js, and the browser","devDependencies":{"mocha":"0.3.6","should":"0.3.2"},"directories":{}}},"time":{"created":"2011-12-11T12:48:39.190Z","modified":"2025-10-13T17:10:11.522Z","0.0.1":"2011-12-11T12:48:40.934Z","0.0.2":"2011-12-11T15:59:23.974Z","0.0.3":"2011-12-12T11:23:58.969Z","0.1.0":"2011-12-13T14:56:06.163Z","0.3.0":"2012-01-19T22:12:51.637Z","1.0.0":"2015-03-19T15:30:24.669Z"},"bugs":{"url":"https://github.com/dscape/spell/issues"},"author":{"url":"http://nunojob.com","name":"Nuno Job","email":"nunojobpinto@gmail.com"},"homepage":"http://github.com/dscape/spell","keywords":["spell","speller","dictionary","nlp","dict","spell check"],"repository":{"url":"git://github.com/dscape/spell","type":"git"},"description":"javascript dictionary module for node.js, and the browser","contributors":[{"url":"http://metaduck.com","name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"}],"maintainers":[{"name":"dscape","email":"nunojobpinto@gmail.com"}],"readme":"# spell\n\n`spell` is a dictionary module for `node.js`. for an explanation of the algorithm, performance, expectations, and techniques used please read [this article][norvig] \n\n# installation\n\n## node.js\n\n1. install [npm]\n2. `npm install spell`\n3. `var spell = require('spell');`\n\n## browser\n\n1. minimize spell.js\n2. load it into your webpage\n\n# usage\n\n## basics\n\n``` js\n// instantiate a new dictionary\nvar dict = spell();\n// load text into dictionary so we can train the dictionary to know\n// which words exists and which ones are more frequent than others\ndict.load(\"I am going to the park with Theo today. It's going to be the bomb\");\nconsole.log(dict.suggest('thew'));\n```\n\nnormally you would generate the dictionary once and then re-use it so this code is unlikely  and serves for demonstration purposes only. this should log:\n\n``` js\n[{\"word\": \"the\", \"score\": 2}, {\"word\": \"theo\", \"score\": 1}]\n```\n\nas there are two occurrences of the word `the` and one of the word `theo`\n\nfeeling lucky?\n\n``` js\ndict.lucky('thew');\n```\n\nreturns\n\n``` js\n\"the\"\n```\n\nyou can also `add` and `remove` words from the dictionary:\n\n``` js\ndict.remove_word('park');\ndict.add_word('nuno');\n```\n\nand you can `reset` the dictionary, making it empty:\n\n``` js\ndict.reset();\n```\n\nif you want to export the dictionary:\n\n``` js\ndict.export();\n```\n\n## advanced\n\nwhen loading you can provide a compiled dictionary instead of free form text\n\n``` js\ndict.load(\n  { corpus: \n    { \"I\"     : 1\n    , \"am\"    : 1\n    , \"going\" : 1\n    , \"to\"    : 2\n    , \"the\"   : 1\n    , \"park\"  : 1\n    }\n  }\n);\n```\n\nyou can also provide options:\n\n* `reset`, defaults to true, meaning it will reset the dictionary before running load\n* `store`, defaults to true, meaning it will store the dictionary after running load\n* `after_store`, defaults to empty function, the callback function to run after `store` is done\n\ne.g. to add text to an existing `dict` you could do:\n\n``` js\ndict.load(\"Better yet, chocolate\", { reset: false } );\n```\n\nfinally when adding words you can optionally give it a score:\n\n``` js\ndict.add_word('beer', {score: 100});\n```\n\nif you are working with words that include punctuation in your dictionary you might need to override the alphabet that is being used. e.g. you might want to add `.` & `@` if you have a dictionary of email address. you can do that by:\n\n``` js\n// instantiate a new dictionary\nvar dict = spell();\n// load text into dictionary so we can train the dictionary to know\n// which words exists and which ones are more frequent than others\ndict.load(\"nuno@dino.saur pedro@space.ship\");\nconsole.log(dict.suggest('nuno@dino.sau',\n  \"abcdefghijklmnopqrstuvwxyz.@\".split(\"\")\n));\n```\n\n## storage\n\nby default `dict` is stored in process (memory) for each dictionary instance you create. however if you feel like storing the dictionary externally, or use a shared dictionary, you can:\n\nan example using `localStorage`:\n\n``` js\nvar dict = spell(\n  { \"get\"   : function () { \n                JSON.parse(window.localStorage.getItem('dict')); \n              }\n  , \"store\" : function (dict,after_store) { \n                window.localStorage.setItem('dict', JSON.stringify(dict));\n              }\n  }\n);\n```\n\n# roadmap\n\ncheck [issues]\n\n# contribute\n\neveryone is welcome to contribute. patches, bug-fixes, new features\n\n1. create an [issue][issues] so the community can comment on your idea\n2. fork `spell`\n3. create a new branch `git checkout -b my_branch`\n4. create tests for the changes you made\n5. make sure you pass both existing and newly inserted tests\n6. commit your changes\n7. push to your branch `git push origin my_branch`\n8. create an pull request\n\n# meta\n\n* code: `git clone git://github.com/dscape/spell.git`\n* home: <http://github.com/dscape/spell>\n* bugs: <http://github.com/dscape/spell/issues>\n* build: [![build status](https://secure.travis-ci.org/dscape/spell.png)](http://travis-ci.org/dscape/spell)\n\n`(oO)--',-` in [caos]\n\n<a name=\"license\"/>\n# license\n\ncopyright 2012 nuno job <nunojob.com> `(oO)--',--`\n\nlicensed under the apache license, version 2.0 (the \"license\");\nyou may not use this file except in compliance with the license.\nyou may obtain a copy of the license at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nunless required by applicable law or agreed to in writing, software\ndistributed under the license is distributed on an \"as is\" basis,\nwithout warranties or conditions of any kind, either express or implied.\nsee the license for the specific language governing permissions and\nlimitations under the license\n\n[npm]: http://npmjs.org\n[issues]: http://github.com/dscape/spell/issues\n[caos]: http://caos.di.uminho.pt/\n[norvig]: http://norvig.com/spell-correct.html\n","readmeFilename":"README.md","users":{"qazedx":true,"erikvold":true,"kristories":true}}