シンプルなユーザー辞書をもとに校正するtextlintルール。
正規表現を使わずに辞書を定義します。 なぜ辞書に登録されているか、説明を書くこともできます。
Google Spread Sheetで辞書を管理するのもおすすめです。 #5 (comment)
形態素解析を行い、単語単位で入力文章と辞書データをマッチングします。 文脈に合わない不正確なマッチを防ぎます。
文脈が崩れやすいため、文章の置換機能はありません。
Install with npm:
npm install textlint-rule-ja-simple-user-dictionary
Via .textlintrc
(Recommended)
{
"rules": {
"ja-simple-user-dictionary": {
"dictionary": [
{
"pattern": "typo"
},
{
"pattern": "ふいんき",
"message": "「ふいんき」ではなく「ふんいき」です。"
}
]
}
}
}
Builds source codes for publish to the lib
folder.
You can write ES2015+ source codes in src/
folder.
npm run build
Run test code in test
folder.
Test textlint rule by textlint-tester.
npm test
MIT © Tomoyuki Hata