|
| 1 | +# textlint-rule-max-kanji-continuous-len |
| 2 | + |
| 3 | +[textlint](https://textlint.github.io/ "textlint") rule that limit max continuous length of kanji(漢字). |
| 4 | + |
| 5 | +漢字が連続する最大文字数を制限する[textlint](https://textlint.github.io/ "textlint")ルールです。 |
| 6 | + |
| 7 | +## Install |
| 8 | + |
| 9 | +Install with [npm](https://www.npmjs.com/): |
| 10 | + |
| 11 | + npm install textlint-rule-max-kanji-continuous-len |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +Via `.textlintrc`(Recommended) |
| 16 | + |
| 17 | + |
| 18 | +```json |
| 19 | +{ |
| 20 | + "rules": { |
| 21 | + "max-kanji-continuous-len": true |
| 22 | + } |
| 23 | +} |
| 24 | +``` |
| 25 | + |
| 26 | +Via CLI |
| 27 | + |
| 28 | +``` |
| 29 | +textlint --rule max-kanji-continuous-len README.md |
| 30 | +``` |
| 31 | + |
| 32 | +## Options |
| 33 | + |
| 34 | +- `max` |
| 35 | + - default: 5 |
| 36 | + - `一二三四五六`は6文字なのでエラーとなります。 |
| 37 | + - 最大の漢字長 |
| 38 | + |
| 39 | + |
| 40 | +```json |
| 41 | +{ |
| 42 | + "rules": { |
| 43 | + "max-kanji-continuous-len": { |
| 44 | + // 最大の漢字長 |
| 45 | + // Allow max continuous length of kanji |
| 46 | + // If {current} > max(5), report Error. |
| 47 | + max: 5 |
| 48 | + } |
| 49 | + } |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +## Further Reading |
| 54 | + |
| 55 | +デフォルト値である漢字の連続調が6文字以上だとエラーとする根拠は今のところありません。 |
| 56 | + |
| 57 | +> 漢字連続長はこの印象に影響が無かったことから、漢字連続長を短くすることで「子ども向けの文章」という印象を与えず、先行研究で指摘される読みやすい文章が実現できると示唆された。 |
| 58 | +> -- [日本心理学会第79回大会 漢字含有率と漢字連続長が文章の印象に与える影響](http://www.myschedule.jp/jpa2015/search/detail_program/id:602) |
| 59 | +
|
| 60 | +漢字の連続長が長くしすぎないことが、読みやすさに繋がることは既存研究にて実証されています。 |
| 61 | + |
| 62 | +おおまかに4文字と5文字に壁があり、そこにバッファをもたせて6文字以上は、デフォルトではエラーとしています。 |
| 63 | + |
| 64 | +- [日本心理学会第79回大会 漢字含有率と漢字連続長が文章の印象に与える影響](http://www.myschedule.jp/jpa2015/search/detail_program/id:602) |
| 65 | +- [漢字含有率と漢字連続長が文章の印象に与える影響.pdf](http://www.myschedule.jp/jpa2015/img/figure/90737.pdf) |
| 66 | +- [02Shibasaki.pdf](http://www.jels.info/REPL/02/02Shibasaki.pdf) |
| 67 | +- [signl136.PDF - signl136-slides.pdf](http://www.nori.jp/publications/SIGNL136/signl136-slides.pdf) |
| 68 | + |
| 69 | +## Changelog |
| 70 | + |
| 71 | +See [Releases page](https://github.com/azu/textlint-rule-max-kanji-continuous-len/releases). |
| 72 | + |
| 73 | +## Running tests |
| 74 | + |
| 75 | +Install devDependencies and Run `npm test`: |
| 76 | + |
| 77 | + npm i -d && npm test |
| 78 | + |
| 79 | +## Contributing |
| 80 | + |
| 81 | +Pull requests and stars are always welcome. |
| 82 | +For bugs and feature requests, [please create an issue](https://github.com/azu/textlint-rule-max-kanji-continuous-len/issues). |
| 83 | + |
| 84 | +1. Fork it! |
| 85 | +2. Create your feature branch: `git checkout -b my-new-feature` |
| 86 | +3. Commit your changes: `git commit -am 'Add some feature'` |
| 87 | +4. Push to the branch: `git push origin my-new-feature` |
| 88 | +5. Submit a pull request :D |
| 89 | + |
| 90 | +## Author |
| 91 | + |
| 92 | +- [github/azu](https://github.com/azu) |
| 93 | +- [twitter/azu_re](http://twitter.com/azu_re) |
| 94 | + |
| 95 | +## License |
| 96 | + |
| 97 | +MIT © azu |
0 commit comments