docs: def to_file(self, f):
          """Write vocab to a file.
  
          :param (file) f: a file object, e.g. as returned by calling `open`
  
          File format:
              word0<TAB>count0
              word1<TAB>count1
              ...
  
          word with index 0 is on the 0th line and so on...
          """
          for word in self._index2word:
              count = self._counts[word]
              f.write(u'{}\t{}\n'.format(word, count).encode('utf-8'))