Skip to content

Commit 01b05a0

Browse files
authored
fix(dict): "ずらい" を 形態素解析ベースに変更 (#9)
1 parent 03487a0 commit 01b05a0

File tree

3 files changed

+78
-6
lines changed

3 files changed

+78
-6
lines changed

dict/prh.yml

-3
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ rules:
172172
- expected: 口が堅い
173173
pattern: /口が[固硬]い/
174174
prh: 堅実さを意味する「堅い」を用いる
175-
- expected: づらい
176-
pattern: ずらい
177-
prh: 動詞の連用形+辛い(つらい)
178175
- expected: 思い$1かない
179176
pattern: /思いも([付つ])かない/
180177
prh: 「思いつかない」で一つの動詞

src/dictionary.js

+50-2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,54 @@ module.exports = [
5151
"pos_detail_1": "自立"
5252
}
5353
]
54-
54+
},
55+
//
56+
{
57+
// https://azu.github.io/morpheme-match/?text=書きずらい
58+
// ず + らい というToken
59+
message: `動詞の連用形+辛い(つらい)の場合は、「ずらい」ではなく「づらい」が適切です。
60+
61+
参考:
62+
- https://www.nhk.or.jp/bunken/summary/kotoba/uraomote/023.html
63+
- https://ameblo.jp/writer-yama/entry-10522384501.html`,
64+
expected: "$1づらい",
65+
tokens: [
66+
{
67+
"pos": "動詞",
68+
"pos_detail_1": "自立",
69+
"conjugated_form": "連用形",
70+
"_capture": "$1"
71+
},
72+
{
73+
"surface_form": "ず",
74+
},
75+
{
76+
"surface_form": "らい",
77+
}
78+
]
79+
},
80+
{
81+
// https://azu.github.io/morpheme-match/?text=読みずらい
82+
// ずら + い というToken
83+
message: `動詞の連用形+辛い(つらい)の場合は、「ずらい」ではなく「づらい」が適切です。
84+
85+
参考:
86+
- https://www.nhk.or.jp/bunken/summary/kotoba/uraomote/023.html
87+
- https://ameblo.jp/writer-yama/entry-10522384501.html`,
88+
expected: "$1づらい",
89+
tokens: [
90+
{
91+
"pos": "動詞",
92+
"pos_detail_1": "自立",
93+
"conjugated_form": "連用形",
94+
"_capture": "$1"
95+
},
96+
{
97+
"surface_form": "ずら",
98+
},
99+
{
100+
"surface_form": "い",
101+
}
102+
]
55103
}
56-
];
104+
];

test/no-confusing-adjust-and-apply-test.js

+28-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ tester.run("textlint-rule-no-confusing-adjust-and-apply", rule, {
2424
"経営に失敗した企業に会社更生法を適用する",
2525
"厚生年金の適用",
2626
"規定を適用",
27-
"法律を適用"
27+
"法律を適用",
28+
"読みづらい"
2829
],
2930
invalid: [
3031
{
@@ -76,6 +77,32 @@ tester.run("textlint-rule-no-confusing-adjust-and-apply", rule, {
7677
message: `"適用"の誤用である可能性があります。適応 => 適用`
7778
}
7879
]
80+
},
81+
{
82+
text: "この本は読みずらい",
83+
output: "この本は読みづらい",
84+
errors: [
85+
{
86+
message: `動詞の連用形+辛い(つらい)の場合は、「ずらい」ではなく「づらい」が適切です。
87+
88+
参考:
89+
- https://www.nhk.or.jp/bunken/summary/kotoba/uraomote/023.html
90+
- https://ameblo.jp/writer-yama/entry-10522384501.html`
91+
}
92+
]
93+
},
94+
{
95+
text: "この本は書きずらい",
96+
output: "この本は書きづらい",
97+
errors: [
98+
{
99+
message: `動詞の連用形+辛い(つらい)の場合は、「ずらい」ではなく「づらい」が適切です。
100+
101+
参考:
102+
- https://www.nhk.or.jp/bunken/summary/kotoba/uraomote/023.html
103+
- https://ameblo.jp/writer-yama/entry-10522384501.html`
104+
}
105+
]
79106
}
80107
]
81108
});

0 commit comments

Comments
 (0)