class_docstr: Splits token text into N-grams.
  
  >>> rext = RegexTokenizer()
  >>> stream = rext("hello there")
  >>> ngf = NgramFilter(4)
  >>> [token.text for token in ngf(stream)]
  ["hell", "ello", "ther", "here"]
class_docstr_tok: ["Splits","token","text","into","N-grams",".",">",">",">","rext","=","RegexTokenizer","(",")",">",">",">","stream","=","rext","(","``","hello","there","''",")",">",">",">","ngf","=","NgramFilter","(","4",")",">",">",">","[","token.text","for","token","in","ngf","(","stream",")","]","[","``","hell","''",",","``","ello","''",",","``","ther","''",",","``","here","''","]"]
docstr: :param minsize: The minimum size of the N-grams.
  :param maxsize: The maximum size of the N-grams. If you omit this
      parameter, maxsize == minsize.
  :param at: If 'start', only take N-grams from the start of each word.
      if 'end', only take N-grams from the end of each word. Otherwise,
      take all N-grams from the word (the default).
docstr_tok: [":","param","minsize",":","The","minimum","size","of","the","N-grams",".",":","param","maxsize",":","The","maximum","size","of","the","N-grams",".","If","you","omit","this","parameter",",","maxsize","==","minsize",".",":","param","at",":","If","'start","'",",","only","take","N-grams","from","the","start","of","each","word",".","if","'end","'",",","only","take","N-grams","from","the","end","of","each","word",".","Otherwise",",","take","all","N-grams","from","the","word","(","the","default",")","."]
code: def __init__(self, minsize, maxsize=None, at=None):
      """
      :param minsize: The minimum size of the N-grams.
      :param maxsize: The maximum size of the N-grams. If you omit this
          parameter, maxsize == minsize.
      :param at: If 'start', only take N-grams from the start of each word.
          if 'end', only take N-grams from the end of each word. Otherwise,
          take all N-grams from the word (the default).
      """
  
      self.min = minsize
      self.max = maxsize or minsize
      self.at = 0
      if at == "start":
          self.at = -1
      elif at == "end":
          self.at = 1
  
file_path: whoosh/src/whoosh/analysis/ngrams.py
imports: from whoosh.compat import text_type
  from whoosh.compat import xrange
  from whoosh.analysis.acore import Token
  from whoosh.analysis.filters import Filter, LowercaseFilter
  from whoosh.analysis.tokenizers import Tokenizer, RegexTokenizer
label_desc: Use image node_id 1 to create a new NgramFilter object from inherited base classes: Filter with example: obj = NgramFilter(minsize, maxsize, at)