Skip to content

textlint-ja/textlint-rule-ja-no-successive-word

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

同一の単語を間違えて連続しているのを見つけるtextlintルール

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •