class_docstr: Class contains implementation of Porter stemming algorithm.
  
  Attributes
  --------
  b : str
      Buffer holding a word to be stemmed. The letters are in b[0], b[1] ... ending at b[`k`].
  k : int
      Readjusted downwards as the stemming progresses.
  j : int
      Word length.
class_docstr_tok: ["Class","contains","implementation","of","Porter","stemming","algorithm",".","Attributes","--","--","--","--","b",":","str","Buffer","holding","a","word","to","be","stemmed",".","The","letters","are","in","b","[","0","]",",","b","[","1","]","...","ending","at","b","[","`","k","`","]",".","k",":","int","Readjusted","downwards","as","the","stemming","progresses",".","j",":","int","Word","length","."]
docstr: Takes off -ant, -ence etc., in context <c>vcvc<v>.
docstr_tok: ["Takes","off","-ant",",","-ence","etc.",",","in","context","<","c",">","vcvc","<","v",">","."]
code: def _step4(self):
      """Takes off -ant, -ence etc., in context <c>vcvc<v>."""
      ch = self.b[self.k - 1]
      if ch == "a":
          if not self._ends("al"):
              return
      elif ch == "c":
          if not self._ends("ance") and not self._ends("ence"):
              return
      elif ch == "e":
          if not self._ends("er"):
              return
      elif ch == "i":
          if not self._ends("ic"):
              return
      elif ch == "l":
          if not self._ends("able") and not self._ends("ible"):
              return
      elif ch == "n":
          if self._ends("ant"):
              pass
          elif self._ends("ement"):
              pass
          elif self._ends("ment"):
              pass
          elif self._ends("ent"):
              pass
          else:
              return
      elif ch == "o":
          if self._ends("ion") and self.b[self.j] in "st":
              pass
          elif self._ends("ou"):
              pass
          # takes care of -ous
          else:
              return
      elif ch == "s":
          if not self._ends("ism"):
              return
      elif ch == "t":
          if not self._ends("ate") and not self._ends("iti"):
              return
      elif ch == "u":
          if not self._ends("ous"):
              return
      elif ch == "v":
          if not self._ends("ive"):
              return
      elif ch == "z":
          if not self._ends("ize"):
              return
      else:
          return
      if self._m() > 1:
          self.k = self.j
  
file_path: gensim/gensim/parsing/porter.py
label_desc: Use image node_id 14 for calling the PorterStemmer obj's underlying member method code with example usage: obj._step4() without return types