docs: def compile_dictionary(self, lang, wordlists, encoding, output):
          """Compile user dictionary."""
  
          cmd = [
              self.binary,
              '--lang', lang,
              '--encoding', codecs.lookup(filters.PYTHON_ENCODING_NAMES.get(encoding, encoding).lower()).name,
              'create',
              'master', output
          ]
  
          wordlist = ''
  
          try:
              output_location = os.path.dirname(output)
              if not os.path.exists(output_location):
                  os.makedirs(output_location)
              if os.path.exists(output):
                  os.remove(output)
  
              self.log("Compiling Dictionary...", 1)
              # Read word lists and create a unique set of words
              words = set()
              for wordlist in wordlists:
                  with open(wordlist, 'rb') as src:
                      for word in src.read().split(b'\n'):
                          words.add(word.replace(b'\r', b''))
  
              # Compile wordlist against language
              util.call(
                  [
                      self.binary,
                      '--lang', lang,
                      '--encoding=utf-8',
                      'create',
                      'master', output
                  ],
                  input_text=b'\n'.join(sorted(words)) + b'\n'
              )
          except Exception:
              self.log(cmd, 0)
              self.log("Current wordlist: '%s'" % wordlist, 0)
              self.log("Problem compiling dictionary. Check the binary path and options.", 0)
              raise