File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ function isRaWord(token) {
16
16
return token . pos == "動詞" && token . pos_detail_1 == "接尾" && token . basic_form == "れる" ;
17
17
}
18
18
19
- function isKoreru ( token ) {
20
- return token . pos == "動詞" && token . basic_form == "来れる" ;
19
+ function isSpecialCases ( token ) {
20
+ // Due to kuromoji.js's behavior, some dropping-ra words will be tokenized as one.
21
+ // See also https://github.com/takuyaa/kuromoji.js/issues/28
22
+ return token . pos == "動詞" && ( token . basic_form == "来れる" || token . basic_form == "見れる" ) ;
21
23
}
22
24
23
25
module . exports = function ( context ) {
@@ -31,7 +33,7 @@ module.exports = function (context) {
31
33
const text = getSource ( node ) ;
32
34
return tokenize ( text ) . then ( tokens => {
33
35
tokens . forEach ( token => {
34
- if ( isKoreru ( token ) ) {
36
+ if ( isSpecialCases ( token ) ) {
35
37
report (
36
38
node ,
37
39
new RuleError ( "ら抜き言葉を使用しています。" , {
You can’t perform that action at this time.
0 commit comments