Skip to content
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

2.2.2 算用数字と漢数字の使い分け について #82

Closed
SGThr7 opened this issue Feb 20, 2021 · 3 comments · Fixed by xuwei-k/scala-protobuf-docs#105 or dev-hato/hato-bot#571
Labels
Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes

Comments

@SGThr7
Copy link
Contributor

SGThr7 commented Feb 20, 2021

matchToReplace(text, /数([0-9]+)倍/g, toKanNumber);
matchToReplace(text, /数([0-9]+)[兆億万]/g, toKanNumber);
matchToReplace(text, /数([0-9]+)年/g, toKanNumber);

このルールはおそらく数10倍などを数十倍に訂正するためのものだと思います。
ですが、周波数2倍ごと〜といった文脈の場合にもエラーが出てしまいます。
また、漢数字を使う数n倍というような言い回しは、n10の倍数の時しか起きないと思います。
例えば、数十倍数百倍といった言い回しはありますが、数二倍というような言い回しはまず見ません。
したがって、以下のような修正が適当だと考えられますがいかがでしょうか。

matchToReplace(text, /数(10*)倍/g, toKanNumber);
matchToReplace(text, /数(10*)[兆億万]/g, toKanNumber);
matchToReplace(text, /数(10*)年/g, toKanNumber);
@azu azu added Type: Bug Bug or Bug fixes Status: PR Welcome Welcome to Pull Request labels Mar 2, 2021
@azu
Copy link
Member

azu commented Mar 2, 2021

たしかに、"数n倍" は 単に "n倍" という気がするので、一桁の値を除外するのはよさそうな気がしますね。

SGThr7 added a commit to SGThr7/textlint-rule-preset-JTF-style that referenced this issue Mar 8, 2021
@azu
Copy link
Member

azu commented Mar 8, 2021

@azu azu closed this as completed Mar 8, 2021
@azu
Copy link
Member

azu commented Mar 8, 2021

@SGThr7 対応ありがとうございます!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment