class_docstr: Merges adjacent tokens into "bi-word" tokens, so that for example::
  
      "the", "sign", "of", "four"
  
  becomes::
  
      "the-sign", "sign-of", "of-four"
  
  This can be used to create fields for pseudo-phrase searching, where if
  all the terms match the document probably contains the phrase, but the
  searching is faster than actually doing a phrase search on individual word
  terms.
  
  The ``BiWordFilter`` is much faster than using the otherwise equivalent
  ``ShingleFilter(2)``.
code: def __call__(self, tokens):
      sep = self.sep
      prev_text = None
      prev_startchar = None
      prev_pos = None
      atleastone = False
  
      for token in tokens:
          # Save the original text of this token
          text = token.text
  
          # Save the original position
          positions = token.positions
          if positions:
              ps = token.pos
  
          # Save the original start char
          chars = token.chars
          if chars:
              sc = token.startchar
  
          if prev_text is not None:
              # Use the pos and startchar from the previous token
              if positions:
                  token.pos = prev_pos
              if chars:
                  token.startchar = prev_startchar
  
              # Join the previous token text and the current token text to
              # form the biword token
              token.text = "".join((prev_text, sep, text))
              yield token
              atleastone = True
  
          # Save the originals and the new "previous" values
          prev_text = text
          if chars:
              prev_startchar = sc
          if positions:
              prev_pos = ps
  
      # If no bi-words were emitted, that is, the token stream only had
      # a single token, then emit that single token.
      if not atleastone:
          yield token
  
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 2 for calling the BiWordFilter obj's underlying member method code with example usage: obj.__call__(tokens) without return types