-
Notifications
You must be signed in to change notification settings - Fork 13
chore: textlint-rule-prhを追加 #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces textlint-rule-prh, a dictionary-based proofreading rule for textlint, to prevent terminology inconsistencies. The implementation includes a prh.yaml configuration file with rules for consistent "Typst" capitalization and updates to textlint configuration to enable the new rule.
- Adds textlint-rule-prh package dependency for dictionary-based text correction
- Creates prh.yaml configuration file with Typst terminology rules
- Updates textlint configuration to integrate the new proofreading rule
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
prh.yaml | Defines dictionary rules for consistent "Typst" capitalization across different contexts |
package.json | Adds textlint-rule-prh and textlint-filter-rule-allowlist dependencies |
.textlintrc.js | Configures prh rule integration and adds allowlist filter for code blocks |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@gomazarashi @kimushun1101 @ultimatile prhの辞書に追加すべき単語について、意見を頂きたいです。
|
個人的に気になっているのが、すべて/全てとたとえば/例えばの表記揺れです。これは常に表現を統一すべき用語ですかね? |
叩き台として、花輪公雄氏の「原稿を作成する際の表記法・用語法について」を参考に、誤検知の対処が難しいものや技術文章に不要なルールを削除し、既存の文章に合わせてルールを調整した辞書を追加しました。 https://www.gp.tohoku.ac.jp/pol/pol/hanawa/open-siryo/report_manual.pdf 表記ゆれがルールベースで統一できれば、統一する表現自体にこだわりはないので、ご意見をお聞かせください。 |
ご対応いただきありがとうございます。
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 42 out of 43 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
「つねに」→「常に」
冪乗と冪乗(ひらがなも含む)→議論中のためissueに送る?
|
「べき乗(冪乗)」はどちらが良いでしょうか?
個人的には漢字表記のほうが好みです。 |
個人的には「冪乗」表記のほうが好みです。また、現状「累乗」となっている箇所も「冪乗」に統一しても良いかと思います。 |
「累乗根」についてはどうしますか?「冪乗根」ではなく「冪根」がより一般的な表記のようです。 |
個人的には「冪乗」/「冪根」で良いと思います。 |
f91af43
to
e7ddb47
Compare
変更箇所も多くなってきたため、以下の仕組みができていれば一旦ここらでマージしてもよいかと思いますが、いかがでしょうか?
その他、懸念点やマージ前に確認しておきたいことなどあればご教示ください。 |
辞書ベースのLintの仕組みは既に実現できているので、叩き台として用意した辞書データさえ問題なければマージできるという認識です。 リンク要素については、外部のページのタイトルなどのプロジェクトの制御下にない文章が入る場合がある関係で、ルールの設定でLint対象から外しています1。 Footnotes |
6da9ecd
to
3b2373a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ご回答いただきありがとうございます。リンク要素を除外する形で対応されているとのこと承知いたしました。
一旦は問題ないと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ご対応いただきありがとうございました。
すみません、統一ルールに個人的に違和感があるものがあって、「原稿を作成する際の表記法・用語法について 」が基準だと思うのですが、その中だと、「表す」を「あらわす」とひらがなにするのは、いまいち根拠がわかりません。 また、「したがって」を「従って」と「原稿を作成する際の表記法・用語法について 」と反するルールになっているのはなぜでしょうか? 何らかの統一的な方針が作れると良いのですが、漢字の方がLLMなどのトークン消費量を抑えられるため、個人的には、可能な限り漢字表記+当て字系は本来不適切なのでひらがな、というのが好みです。 |
公用文の用字用語例によると、「従う」(動詞)、「したがって」(接続詞)、「表す」と統一するのが良さそうですが、これで統一してよろしいでしょうか? 「あらわす」には「現す」や「著す」を使う場面もありますが、Typstの技術文章でこれらの使用場面はなさそうなので、いったん「表す」で統一することにします。 |
ありがとうございます。良さそうです。 |
このPull Requestでは、textlintのルールとして、辞書ベースの校正を行うtextlint-rule-prhを導入します。これにより各用語の表記ゆれを抑制できます。
辞書に追加する用語は、「常に表現を統一すべき用語」と「状況に応じて適切な表現を選ぶ必要がある用語」に区分できると考えています。これらの区分に応じて、severity level をそれぞれ
error
とinfo
に設定することで、柔軟な運用が可能になると考えます。このPRでは、まずは「常に表現を統一すべき用語」を辞書に追加します。