code: def _uniquewords(*args):
      
      words = {}
      n = 0
      for word in itertools.chain(*args):
          if word not in words:
              words[word] = n
              n += 1
      return words
docs: Dictionary of words to their indices.  Helper function to `encode.`