Code Monkey home page Code Monkey logo

textlint-rule-ja-no-successive-word's Introduction

textlint-rule-ja-no-successive-word Actions Status: test

同一の単語(厳密には形態素解析した結果のToken)が間違えて連続しているのを見つけるtextlintルール。 入力ミスによる同じ単語が連続している問題を発見します。

OK:

これは問題ない文章です。
すもももももももものうち
111回目の問題
フレームレートが落ちて動作がカクカクしてきた

NG:

これはは問題ある文章です。
これは問題あるある文章です
  • が連続している
  • あるが連続している

Install

Install with npm:

npm install textlint-rule-ja-no-successive-word

Usage

Via .textlintrc(Recommended)

{
    "rules": {
        "ja-no-successive-word": true
    }
}

Via CLI

textlint --rule ja-no-successive-word README.md

Options

オプションのデフォルト値

{
    "rules": {
        "ja-no-successive-word": {
            // オノマトペを許可する
            // 制限: オノマトペを判定する方法がないため、同じカタカナの語が連続したものをオノマトペとして扱う
            // 例) カクカク、ドキドキ、ビリビリ
            // https://ja.wikipedia.org/wiki/%E6%93%AC%E5%A3%B0%E8%AA%9E
            allowOnomatopee: true,
            
            // 許可する単語
            // RegExp-like Stringを使用可能
            allow: []
        }
    }
}
  • allowOnomatopee: boolean
    • Default: true
    • カクカクなどのオノマトペを許可するかのオプションです。
  • allow: string[]
    • Default: []
    • 許可する単語を指定するオプションです。
    • RegExp-like Stringを使用できます。

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

参考

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.