code: function step1c(token) {
      var r1 = getR1(token);
  
      if (!r1) {
          return token;
      }
  
      if (r1.match(/(erte|ert)$/)) {
          return token.replace(/(erte|ert)$/, 'er');
      }
  
      return token;
  }
docs: step 1c as defined for the porter stemmer algorithm.