class_docstr: Stems (removes suffixes from) the text of tokens using the Porter
  stemming algorithm. Stemming attempts to reduce multiple forms of the same
  root word (for example, "rendering", "renders", "rendered", etc.) to a
  single word in the index.
  
  >>> stemmer = RegexTokenizer() | StemFilter()
  >>> [token.text for token in stemmer("fundamentally willows")]
  ["fundament", "willow"]
  
  You can pass your own stemming function to the StemFilter. The default
  is the Porter stemming algorithm for English.
  
  >>> stemfilter = StemFilter(stem_function)
  
  You can also use one of the Snowball stemming functions by passing the
  `lang` keyword argument.
  
  >>> stemfilter = StemFilter(lang="ru")
  
  The list of available languages is in `whoosh.lang.languages`.
  You can use :func:`whoosh.lang.has_stemmer` to check if a given language has
  a stemming function available.
  
  By default, this class wraps an LRU cache around the stemming function. The
  ``cachesize`` keyword argument sets the size of the cache. To make the
  cache unbounded (the class caches every input), use ``cachesize=-1``. To
  disable caching, use ``cachesize=None``.
  
  If you compile and install the py-stemmer library, the
  :class:`PyStemmerFilter` provides slightly easier access to the language
  stemmers in that library.
class_docstr_tok: ["Stems","(","removes","suffixes","from",")","the","text","of","tokens","using","the","Porter","stemming","algorithm",".","Stemming","attempts","to","reduce","multiple","forms","of","the","same","root","word","(","for","example",",","``","rendering","''",",","``","renders","''",",","``","rendered","''",",","etc",".",")","to","a","single","word","in","the","index",".",">",">",">","stemmer","=","RegexTokenizer","(",")","|","StemFilter","(",")",">",">",">","[","token.text","for","token","in","stemmer","(","``","fundamentally","willows","''",")","]","[","``","fundament","''",",","``","willow","''","]","You","can","pass","your","own","stemming","function","to","the","StemFilter",".","The","default","is","the","Porter","stemming","algorithm","for","English",".",">",">",">","stemfilter","=","StemFilter","(","stem_function",")","You","can","also","use","one","of","the","Snowball","stemming","functions","by","passing","the","`","lang","`","keyword","argument",".",">",">",">","stemfilter","=","StemFilter","(","lang=","''","ru","''",")","The","list","of","available","languages","is","in","`","whoosh.lang.languages","`",".","You","can","use",":","func",":","`","whoosh.lang.has_stemmer","`","to","check","if","a","given","language","has","a","stemming","function","available",".","By","default",",","this","class","wraps","an","LRU","cache","around","the","stemming","function",".","The","``","cachesize","``","keyword","argument","sets","the","size","of","the","cache",".","To","make","the","cache","unbounded","(","the","class","caches","every","input",")",",","use","``","cachesize=-1","``",".","To","disable","caching",",","use","``","cachesize=None","``",".","If","you","compile","and","install","the","py-stemmer","library",",","the",":","class",":","`","PyStemmerFilter","`","provides","slightly","easier","access","to","the","language","stemmers","in","that","library","."]
docstr: :param stemfn: the function to use for stemming.
  :param lang: if not None, overrides the stemfn with a language stemmer
      from the ``whoosh.lang.snowball`` package.
  :param ignore: a set/list of words that should not be stemmed. This is
      converted into a frozenset. If you omit this argument, all tokens
      are stemmed.
  :param cachesize: the maximum number of words to cache. Use ``-1`` for
      an unbounded cache, or ``None`` for no caching.
docstr_tok: [":","param","stemfn",":","the","function","to","use","for","stemming",".",":","param","lang",":","if","not","None",",","overrides","the","stemfn","with","a","language","stemmer","from","the","``","whoosh.lang.snowball","``","package",".",":","param","ignore",":","a","set\/list","of","words","that","should","not","be","stemmed",".","This","is","converted","into","a","frozenset",".","If","you","omit","this","argument",",","all","tokens","are","stemmed",".",":","param","cachesize",":","the","maximum","number","of","words","to","cache",".","Use","``","-1","``","for","an","unbounded","cache",",","or","``","None","``","for","no","caching","."]
code: def __init__(
      self, stemfn=stem, lang=None, ignore=None, cachesize=50000
  ):
      """
      :param stemfn: the function to use for stemming.
      :param lang: if not None, overrides the stemfn with a language stemmer
          from the ``whoosh.lang.snowball`` package.
      :param ignore: a set/list of words that should not be stemmed. This is
          converted into a frozenset. If you omit this argument, all tokens
          are stemmed.
      :param cachesize: the maximum number of words to cache. Use ``-1`` for
          an unbounded cache, or ``None`` for no caching.
      """
  
      self.stemfn = stemfn
      self.lang = lang
      self.ignore = frozenset() if ignore is None else frozenset(ignore)
      self.cachesize = cachesize
      # clear() sets the _stem attr to a cached wrapper around self.stemfn
      self.clear()
  
imports: from whoosh.analysis.filters import Filter
  from whoosh.compat import integer_types
  from whoosh.lang.dmetaphone import double_metaphone
  from whoosh.lang.porter import stem
  from whoosh.util.cache import lfu_cache, unbound_cache
label_desc: Use image node_id 1 to create a new StemFilter object from inherited base classes: Filter with example: obj = StemFilter(stemfn, lang, ignore, cachesize)