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: Check if b[i] is a consonant letter.
  
  Parameters
  ----------
  i : int
      Index for `b`.
  
  Returns
  -------
  bool
  
  Examples
  --------
  .. sourcecode:: pycon
  
      >>> from gensim.parsing.porter import PorterStemmer
      >>> p = PorterStemmer()
      >>> p.b = "hi"
      >>> p._cons(1)
      False
      >>> p.b = "meow"
      >>> p._cons(3)
      True
docstr_tok: ["Check","if","b","[","i","]","is","a","consonant","letter",".","Parameters","--","--","--","--","--","i",":","int","Index","for","`","b","`",".","Returns","--","--","--","-","bool","Examples","--","--","--","--","..","sourcecode",":",":","pycon",">",">",">","from","gensim.parsing.porter","import","PorterStemmer",">",">",">","p","=","PorterStemmer","(",")",">",">",">","p.b","=","``","hi","''",">",">",">","p._cons","(","1",")","False",">",">",">","p.b","=","``","meow","''",">",">",">","p._cons","(","3",")","True"]
code: def _cons(self, i):
      """Check if b[i] is a consonant letter.
  
      Parameters
      ----------
      i : int
          Index for `b`.
  
      Returns
      -------
      bool
  
      Examples
      --------
      .. sourcecode:: pycon
  
          >>> from gensim.parsing.porter import PorterStemmer
          >>> p = PorterStemmer()
          >>> p.b = "hi"
          >>> p._cons(1)
          False
          >>> p.b = "meow"
          >>> p._cons(3)
          True
  
      """
      ch = self.b[i]
      if ch in "aeiou":
          return False
      if ch == "y":
          return i == 0 or not self._cons(i - 1)
      return True
  
file_path: gensim/gensim/parsing/porter.py
label_desc: Use image node_id 2 for calling the PorterStemmer obj's underlying member method code with example usage: obj._cons(i) and returns: True, False, unknown