{"_id":"@cantoo/node-languagetool","_rev":"10-a3c614ce0ffe2f42c7efaf2a6c81abc9","name":"@cantoo/node-languagetool","dist-tags":{"latest":"0.5.1"},"versions":{"0.5.0":{"name":"@cantoo/node-languagetool","version":"0.5.0","keywords":["language","tool","binding","grammar","spellcheck","human"],"license":"MIT","_id":"@cantoo/node-languagetool@0.5.0","maintainers":[{"name":"sharcoux","email":"f.billioud@gmail.com"},{"name":"netoguimaraes","email":"joao.neto.guimaraes@gmail.com"},{"name":"marcospgs","email":"marcospg-silva@hotmail.com"},{"name":"ribeirofmatheus","email":"matheus_f.ribeiro@hotmail.com"},{"name":"ja0n","email":"jamonsterr@gmail.com"},{"name":"matheusrdsantos","email":"matheus.r.d.s10@hotmail.com"}],"homepage":"https://github.com/cantoo-scribe/node-languagetool#readme","bugs":{"url":"https://github.com/cantoo-scribe/node-languagetool/issues"},"dist":{"shasum":"74dd3b5c298804103a2a4582cde9714329366eca","tarball":"https://registry.npmjs.org/@cantoo/node-languagetool/-/node-languagetool-0.5.0.tgz","fileCount":12,"integrity":"sha512-I+u21eblZMgT12dF5ubxfvAaL+yWRGNDFWf6FskWODm5suazOawUMuiTKik+m817kectzs8aDXkDWeTG6hWYbA==","signatures":[{"sig":"MEQCIGCUt6hlVvHvGbhWMBd2EhRbo3bIFA4Vg7S7Dq1yKEQ+AiBC191CTv3qUYdiYHyKhpzfY3h8HHG4hHbPt8Z0w4S2LA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl5rsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrZRAAkXtJcRD09BsR539phvL99ZIONcrJU2qJAHKG6M/g3adoWjEi\r\n1OBWtZMI6IWgh9kVAmIbWfBt6oHxS1xB0bfAqpsNrbLwUWRy43n3Qhllb1pi\r\nJOS2ikAOx70sUgLTJ1yss64D0KG8gNrmk6BD5u9VNhpaaJlLOJM7sS1go6yq\r\nMAn/KG5qhB0uG5/fLLn+fDf+X6UhK5Or3mEmRnQBCfPgIVqy0fXpK8nH2be6\r\nXFozCahw6E4QjyEky43DEkH4MHiJkXsX2LngaFQ6OWLIcXB9uiS2PEmH7wvQ\r\noiWmLDiztcVKzpd062V43887qKr3fHcOVak/5CCSeZHD8R+DrqxkIHnJphrF\r\nKDuqKeQhjgOxMCjYOj9rWOLMl2F65IBFjVCdx4nNwLewip3JjZ2ilQ1/E0Or\r\nyu7DJ9KM5T/tC1HWtCGQSHps/q0tutt/d8adTHnpm53MbbP0o0xxbIan9A4q\r\nIlKWICkVkGTwZoYBAbZnHiW1sul+rDqe03u+t/fDtV2ve9h79OJOcUKEUSGg\r\ndPu/4fXgqyWBnyIA4jzTmzsgsaCVPABTTcTSc50pkwcPl3k34aW/yqc9SNel\r\n/oNEXAI/IgxSDB2iR+2RYFkJ29GaMlzF9ZSQgeaKazVlgcIgl/JEjVQbKy2J\r\nLkLVxtyuUzR6n92eQBeTZu1BEBveu6z+iQw=\r\n=5Zjz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"300233c7164829de915001d52a45c64bdb3b3442","scripts":{"test":"node test.js","install":"node install.js"},"_npmUser":{"name":"ribeirofmatheus","email":"matheus_f.ribeiro@hotmail.com"},"repository":{"url":"git+https://github.com/cantoo-scribe/node-languagetool.git","type":"git"},"_npmVersion":"6.14.17","description":"Node.js binding to the Language Tool spellchecker framework","directories":{},"_nodeVersion":"14.20.1","dependencies":{"node-jre":"^0.2.3"},"_hasShrinkwrap":false,"devDependencies":{"node-grd":"^0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/node-languagetool_0.5.0_1670879980061_0.1479562726570265","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@cantoo/node-languagetool","version":"0.5.1","keywords":["language","tool","binding","grammar","spellcheck","human"],"license":"MIT","_id":"@cantoo/node-languagetool@0.5.1","maintainers":[{"name":"sharcoux","email":"f.billioud@gmail.com"},{"name":"netoguimaraes","email":"joao.neto.guimaraes@gmail.com"},{"name":"marcospgs","email":"marcospg-silva@hotmail.com"},{"name":"ribeirofmatheus","email":"matheus_f.ribeiro@hotmail.com"},{"name":"ja0n","email":"jamonsterr@gmail.com"},{"name":"matheusrdsantos","email":"matheus.r.d.s10@hotmail.com"}],"homepage":"https://github.com/cantoo-scribe/node-languagetool#readme","bugs":{"url":"https://github.com/cantoo-scribe/node-languagetool/issues"},"dist":{"shasum":"d827f7b82bc07ca82800c347833acb15345ad455","tarball":"https://registry.npmjs.org/@cantoo/node-languagetool/-/node-languagetool-0.5.1.tgz","fileCount":12,"integrity":"sha512-oOEbgm1HamMFdNLuaOHv4EqmHoYnb0DyknW5xUnyGMqYAk3ANa5a3iUMeJg0xHE+9OKiUd51Rg0Xb4GlxFmZIA==","signatures":[{"sig":"MEYCIQCvDWe8KCA2WP8PartqB4mgOJC+MfkloXQ4dvvd2Gxq+wIhAOBzfpcmtNgN/4q6c3hUt4j9T32bJPur+Tu+OkiAfF9B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl59fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoV+A/+N2MYMXt4omd1AfZqfwGIUY33kSfAZXEqY/aKSGE2zdtLJ5u+\r\nj3EG60y8eLUZ4WEC2hDlSHn9c3IKAPOZh2VI9kOI69xJAgnoq/81Pn5RDEaq\r\nRKa96hgQiytilgEF4vo8bMxUnAx70xYXvQ2peT4zn5VU8ZmoMyvk5z8lN9j4\r\nRQqhy91fG0W+xpw23C9oKkG5cx34sOJlRYLD6+648qY4KItTKfIN6QUhHWux\r\nVY92IlXnwk5gZygPiTYmqNy6huoMQkJKNHH/hpV6NDJ68Fb6rzj/FafLVPCe\r\n0NRo2BRhVamYEpaYsGOFlahheKQDabeJJXL71nnZv41MHtbkhQEF1oWrk42Y\r\n43Z2dUcZt3miSv86i0hEBSw2qLEWaNkkNF6vg75eeKPBNt8BShRXuIQavVvn\r\nAgAoc9JtUg0oUD5e08Lr1Mm7pv46C1SIBmqlVuTRPnlh/NLshW0a6FSOaRQM\r\n32eMmXqLdy5jJ5pHJ63Wu+jAR8tFSgX9Z0wBCXr9us7KdzR2nrOPNx/fW74i\r\nj9GTVDA/wcddPBI+pAr2yPWRMqymjInBXmoIXnEpldNpANZnhUy8QsPjhCsP\r\nmBarvsTJoU5KTriEW37u6i3alSWyTq6IBpOK6VW6vz82dyqzb46/yuxWibnr\r\nwDUmMzM1wa58cUYcOJO7dMsutv2uR5iQL7g=\r\n=Ckya\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"0c678ad4bb24487558792bbad1a10a761f8c32bc","scripts":{"test":"node test.js","install":"node install.js"},"_npmUser":{"name":"ribeirofmatheus","email":"matheus_f.ribeiro@hotmail.com"},"repository":{"url":"git+https://github.com/cantoo-scribe/node-languagetool.git","type":"git"},"_npmVersion":"6.14.17","description":"Node.js binding to the Language Tool spellchecker framework","directories":{},"_nodeVersion":"14.20.1","dependencies":{"node-grd":"^0.4.0","node-jre":"^0.2.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/node-languagetool_0.5.1_1670881119554_0.8399579062846936","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-12-12T21:19:39.990Z","modified":"2026-05-05T16:23:52.807Z","0.4.2":"2022-12-12T18:32:54.927Z","0.5.0":"2022-12-12T21:19:40.277Z","0.5.1":"2022-12-12T21:38:39.715Z"},"bugs":{"url":"https://github.com/cantoo-scribe/node-languagetool/issues"},"license":"MIT","homepage":"https://github.com/cantoo-scribe/node-languagetool#readme","keywords":["language","tool","binding","grammar","spellcheck","human"],"repository":{"url":"git+https://github.com/cantoo-scribe/node-languagetool.git","type":"git"},"description":"Node.js binding to the Language Tool spellchecker framework","maintainers":[{"email":"f.billioud@gmail.com","name":"sharcoux"},{"email":"matheus_f.ribeiro@hotmail.com","name":"ribeirofmatheus"},{"email":"matheus.r.d.s10@hotmail.com","name":"matheusrdsantos"},{"email":"gabrielnsdantas@gmail.com","name":"gabrielnsd"},{"email":"felipe@cantoo.fr","name":"felipecantoo"},{"email":"nicodemos54324@gmail.com","name":"nicodemos234"}],"readme":"# @cantoo/node-languagetool\n\nThis is a Node.js binding to the [LanguageTool](https://languagetool.org/) (LT)\nspellchecker. It is based on a local instance of LT.\nAs it is a Java based framework, this binding will use\n[node-jre](https://github.com/schreiben/node-jre/), which provides an embedded\nlocal Java Runtime Engine.\n\n## Install\n\n```bash\nnpm i @cantoo/node-languagetool\n```\n\n## Usage\n\nThe following code\n\n```javascript\nconst lt = require('@cantoo/node-languagetool')\n\nlt.check('This is wong. Tolt you so.', 'en-US').then(console.log)\n```\n\nshould print something like this:\n\n```JSON\n[\n  {\n    \"offset\": 8,\n    \"length\": 4,\n    \"message\": \"Possible spelling mistake found\",\n    \"shortMessage\": \"Spelling mistake\",\n    \"replacements\": [\n      \"Wong\",\n      \"long\",\n      \"won\",\n      \"wing\",\n      \"song\",\n      \"Kong\",\n      \"Long\",\n      \"wrong\",\n      \"Wang\",\n      \"Cong\",\n      \"Yong\",\n      \"gong\",\n      \"pong\",\n      \"bong\",\n      \"tong\",\n      \"wont\",\n      \"wonk\",\n      \"dong\",\n      \"wog\",\n      \"won g\"\n    ],\n    \"ruleId\": \"MORFOLOGIK_RULE_EN_US\",\n    \"ruleDescription\": \"Possible spelling mistake\",\n    \"ruleIssueType\": \"misspelling\",\n    \"ruleCategoryId\": \"TYPOS\",\n    \"ruleCategoryName\": \"Possible Typo\"\n  },\n  {\n    \"offset\": 14,\n    \"length\": 4,\n    \"message\": \"Possible spelling mistake found\",\n    \"shortMessage\": \"Spelling mistake\",\n    \"replacements\": [\n      \"Told\",\n      \"Toll\",\n      \"Bolt\",\n      \"Colt\",\n      \"Holt\",\n      \"Tilt\",\n      \"Tort\",\n      \"Volt\",\n      \"Molt\",\n      \"Tot\",\n      \"Tout\",\n      \"Jolt\",\n      \"Toot\",\n      \"Dolt\",\n      \"Tole\"\n    ],\n    \"ruleId\": \"MORFOLOGIK_RULE_EN_US\",\n    \"ruleDescription\": \"Possible spelling mistake\",\n    \"ruleIssueType\": \"misspelling\",\n    \"ruleCategoryId\": \"TYPOS\",\n    \"ruleCategoryName\": \"Possible Typo\"\n  }\n]\n```\n\nTo get all supported languages you can call the following:\n\n```javascript\nlt.languages().then(console.log) // Should print a list of language-locale pairs\n```\n\n## API\n\n`lt.check(text, locale)` Spellchecks the provided text.\n\n- `text` (string). The text to be spellchecked.\n- `locale` (string). The locale code. Use `lt.languages()` to get a list of supported languages and their locale codes.\n- Returns a `Promise` object. It will resolve to an array of the following form:\n\n```javascript\n[\n  {\n    \"offset\": 8, // offset within the provided text\n    \"length\": 4, // length of the misspelled text fragment\n    \"message\": \"Possible spelling mistake found\", // long description\n    \"shortMessage\": \"Spelling mistake\", // short description\n    \"replacements\": [ // replacement options\n      \"Wong\",\n      \"won g\" // [...]\n    ],\n    \"ruleId\": \"MORFOLOGIK_RULE_EN_US\", // key of the underlying rule\n    \"ruleDescription\": \"Possible spelling mistake\", // description of the rule\n    \"ruleIssueType\": \"misspelling\", // issue type of the rule\n    \"ruleCategoryId\": \"TYPOS\", // ID of the category this rule belongs to\n    \"ruleCategoryName\": \"Possible Typo\" // description of the category this rule belongs to\n  } // [...]\n]\n```\n\n`lt.languages()` Retrieve all supported languages.\n\n- Returns a `Promise` object. It will resolve to an array of the following form:\n\n```javascript\n[\n  {\n    \"name\": \"English (US)\", // full name of the language (and variant)\n    \"locale\": \"en_US\" // locale code of the language variant\n  } // [...]\n]\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2016 schreiben\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","readmeFilename":"README.md"}