class_docstr: Given a set of words (or any object with a ``__contains__`` method),
  break any tokens in the stream that are composites of words in the word set
  into their individual parts.
  
  Given the correct set of words, this filter can break apart run-together
  words and trademarks (e.g. "turbosquid", "applescript"). It can also be
  useful for agglutinative languages such as German.
  
  The ``keep_compound`` argument lets you decide whether to keep the
  compound word in the token stream along with the word segments.
  
  >>> cwf = CompoundWordFilter(wordset, keep_compound=True)
  >>> analyzer = RegexTokenizer(r"\S+") | cwf
  >>> [t.text for t in analyzer("I do not like greeneggs and ham")
  ["I", "do", "not", "like", "greeneggs", "green", "eggs", "and", "ham"]
  >>> cwf.keep_compound = False
  >>> [t.text for t in analyzer("I do not like greeneggs and ham")
  ["I", "do", "not", "like", "green", "eggs", "and", "ham"]
code: def __call__(self, tokens):
      keep_compound = self.keep_compound
      memo = {}
      subwords = self.subwords
      for t in tokens:
          subs = subwords(t.text, memo)
          if subs:
              if len(subs) > 1 and keep_compound:
                  yield t
              for subword in subs:
                  t.text = subword
                  yield t
          else:
              yield t
  
imports: import re
  from collections import deque
  from whoosh.compat import u, text_type
  from whoosh.compat import xrange
  from whoosh.analysis.filters import Filter
label_desc: Use image node_id 3 for calling the CompoundWordFilter obj's underlying member method code with example usage: obj.__call__(tokens) without return types