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) {
1616 return token . pos == "動詞" && token . pos_detail_1 == "接尾" && token . basic_form == "れる" ;
1717}
1818
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 == "見れる" ) ;
2123}
2224
2325module . exports = function ( context ) {
@@ -31,7 +33,7 @@ module.exports = function (context) {
3133 const text = getSource ( node ) ;
3234 return tokenize ( text ) . then ( tokens => {
3335 tokens . forEach ( token => {
34- if ( isKoreru ( token ) ) {
36+ if ( isSpecialCases ( token ) ) {
3537 report (
3638 node ,
3739 new RuleError ( "ら抜き言葉を使用しています。" , {
You can’t perform that action at this time.
0 commit comments