{"_id":"@azu/rousseau","_rev":"3-c896776bad9bf8360d2be49d05e1a2c3","name":"@azu/rousseau","description":"Lightweight proofreader","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.5":{"name":"@azu/rousseau","version":"1.0.5","homepage":"https://github.com/GitbookIO/rousseau","description":"Lightweight proofreader","main":"lib/index.js","dependencies":{"lodash":"^3.2.0","bash-color":"0.0.3","cli-table":"0.3.1","crc":"3.2.1","simple-lru-cache":"0.0.1","tokenize-text":"1.1.3","tokenize-english":"1.0.3","tokenize-htmltext":"1.0.0","find-line-column":"0.5.2"},"devDependencies":{"mocha":"2.3.3","should":"7.1.0"},"scripts":{"test":"mocha --reporter spec --recursive --bail"},"bin":{"rousseau":"./bin/rousseau.js"},"repository":{"type":"git","url":"git+https://github.com/GitbookIO/rousseau.git"},"keywords":["proofreading","language","native","spellcheck"],"author":{"name":"GitBook","email":"contact@gitbook.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/GitbookIO/rousseau/issues"},"gitHead":"e921e45592930fa4f71d2da9dc979e08df7c6933","_id":"@azu/rousseau@1.0.5","_shasum":"93919b006e7ae1967d6d72bd2171a8ed1860d541","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"93919b006e7ae1967d6d72bd2171a8ed1860d541","tarball":"https://registry.npmjs.org/@azu/rousseau/-/rousseau-1.0.5.tgz","integrity":"sha512-xvj0DoFynmZHOP0TtP6yibPxehQD52lk2ElxoRBb8n8D011k8SSmDqx6JkPBCeNuundwbseaIwMck0s4m1YGMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwUJPG6S4QPcYdcfP7Y65TbBQDUm0W+pWCT2Hp/GZZaAiADV4N7x9uFnXQhG7vA7PRWhxV8/EJHb/7UVswuv0rHAQ=="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/rousseau-1.0.5.tgz_1461982192855_0.5585632105357945"}}},"readme":"\n![Rousseau](./preview.jpg)\n\n[![Build Status](https://travis-ci.org/GitbookIO/rousseau.png?branch=master)](https://travis-ci.org/GitbookIO/rousseau)\n[![NPM version](https://badge.fury.io/js/rousseau.svg)](http://badge.fury.io/js/rousseau)\n\nRousseau is a lightweight proofreader written in Javascript, it can be used in Node.JS, in the command line and in the browser.\n\n### Installation\n\nFork version.\nFor only one line change: https://github.com/GitbookIO/rousseau/pull/3\n\n```\n$ npm install @azu/rousseau\n```\n\n### API\n\n```js\nvar rousseau = require(\"@azu/rousseau\");\n\nrousseau('So the cat was stolen.', function(err, results) {\n    ...\n});\n```\n\n`results` is an array of object like:\n\n```js\n{\n    // Type of check that output this suggestion\n    type: \"so\",\n\n    // Level of importance\n    // \"suggestion\", \"warning\", \"error\"\n    level: \"warning\",\n\n    // Index in the text\n    index: 10,\n\n    // Size of the section in the text\n    offset: 2,\n\n    // Message to describe the suggestion\n    message: \"omit 'So' from the beginning of sentences\",\n\n    // Replacements suggestion\n    replacements: [\n        {\n            value: \"\"\n        }\n    ]\n}\n```\n\n### Checks\n\nYou can disable any combination of the following by providing a key with value `false` as option `checks` to `rousseau`.\n\n##### English\n\n| ID    | Description     |\n| ----- | --------------- |\n| `passive` | Checks for passive voice |\n| `lexical-illusion` | Checks for lexical illusions – cases where a word is repeated. |\n| `so` | Checks for `so` at the beginning of the sentence. |\n| `adverbs` | Checks for adverbs that can weaken meaning: really, very, extremely, etc. |\n| `readibility` | Checks for readibility of sentences. |\n| `simplicity` | Checks for simpler expressions |\n| `weasel` | Checks for \"weasel words.\" |\n| `sentence:start` | Checks that sentence is preceded by a space |\n| `sentence:end` | Checks that there is no space between a sentence and its ending punctuation |\n| `sentence:uppercase` | Checks that sentences are starting with uppercase letter |\n\n\n### Extend Rousseau\n\nExample: Extend rousseau with a Spellchecker.\n\n```js\nrousseau(\"Some text\", {\n    checks: {\n        spelling: rousseau.tokenize.check([\n            rousseau.tokenize.words(),\n            rousseau.filter(function(word) {\n                return wordIsValid(word);\n            }),\n            rousseau.define({\n                level: rousseau.levels.ERROR,\n                message: \"Spelling error\"\n            })\n        ])\n    }\n}, function(err, results) {\n    ...\n})\n\n```\n\n### Cache\n\nRousseau use an internal cache for certain operations (tokenization, spellchecking, ...); this cache can be configured using the option `cache`:\n\n```js\nrousseau('So the cat was stolen.', {\n    cache: 100 // A maximum of 100 elements will be stored in the memory cache\n}, function(err, results) {\n    ...\n});\n```\n\n### Contributing\n\nWe'd love to accept your patches and contributions to improve Rousseau (supported languages, checks, ...). Learn more about how to contribute in [CONTRIBUTING.md](./CONTRIBUTING.md).\n","maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"time":{"modified":"2022-06-12T15:00:15.603Z","created":"2016-04-30T02:09:53.315Z","1.0.5":"2016-04-30T02:09:53.315Z"},"homepage":"https://github.com/GitbookIO/rousseau","keywords":["proofreading","language","native","spellcheck"],"repository":{"type":"git","url":"git+https://github.com/GitbookIO/rousseau.git"},"author":{"name":"GitBook","email":"contact@gitbook.com"},"bugs":{"url":"https://github.com/GitbookIO/rousseau/issues"},"license":"Apache-2.0","readmeFilename":"README.md"}