Skip to content

シンプルなユーザー辞書をもとに校正するtextlintルール。

License

Notifications You must be signed in to change notification settings

hata6502/textlint-rule-ja-simple-user-dictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textlint-rule-ja-simple-user-dictionary

シンプルなユーザー辞書をもとに校正するtextlintルール。

特長

シンプルな辞書定義

正規表現を使わずに辞書を定義します。 なぜ辞書に登録されているか、説明を書くこともできます。

Google Spread Sheetで辞書を管理するのもおすすめです。 #5 (comment)

文脈に合ったマッチング

形態素解析を行い、単語単位で入力文章と辞書データをマッチングします。 文脈に合わない不正確なマッチを防ぎます。

置換機能なし

文脈が崩れやすいため、文章の置換機能はありません。

Install

Install with npm:

npm install textlint-rule-ja-simple-user-dictionary

Usage

Via .textlintrc(Recommended)

{
  "rules": {
    "ja-simple-user-dictionary": {
      "dictionary": [
        {
          "pattern": "typo"
        },
        {
          "pattern": "ふいんき",
          "message": "「ふいんき」ではなく「ふんいき」です。"
        }
      ]
    }
  }
}

Build

Builds source codes for publish to the lib folder. You can write ES2015+ source codes in src/ folder.

npm run build

Tests

Run test code in test folder. Test textlint rule by textlint-tester.

npm test

License

MIT © Tomoyuki Hata

About

シンプルなユーザー辞書をもとに校正するtextlintルール。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages