lib/natural/stemmers/indonesian/stemmer_id.js
function precedenceAdjustmentSpecification(word){
    var regex_rules = [
        /^be(.*)lah$/,
        /^be(.*)an$/,
        /^me(.*)i$/,
        /^di(.*)i$/,
        /^pe(.*)i$/,
        /^ter(.*)i$/,
    ];

    for(var i in regex_rules){
        if(word.match(regex_rules[i])){
            return true;
        }
    }
    return false;
}
function precedenceAdjustmentSpecification(word){
    var regex_rules = [
        /^be(.*)lah$/,
        /^be(.*)an$/,
        /^me(.*)i$/,
        /^di(.*)i$/,
        /^pe(.*)i$/,
        /^ter(.*)i$/,
    ];

    for(var i in regex_rules){
        if(word.match(regex_rules[i])){
            return true;
        }
    }
    return false;
}
function precedenceAdjustmentSpecification ( word ) { var regex_rules = [ / ^be(.*)lah$ / , / ^be(.*)an$ / , / ^me(.*)i$ / , / ^di(.*)i$ / , / ^pe(.*)i$ / , / ^ter(.*)i$ / , ] ; for ( var i in regex_rules ) { if ( word . match ( regex_rules [ i ] ) ) { return true ; } } return false ; }
Check if word require precedence adjustment or not Adjustment means remove prefix then suffix instead of remove suffix then prefix
Check if word require precedence adjustment or not Adjustment means remove prefix then suffix instead of remove suffix then prefix