()
return vocab_file
Generate Vocab file for test. no usage now
Generate Vocab file for test. no usage now
Generate Vocab file for test . no usage now
def generate_vocab_file():
  """Generate Vocab file for test. no usage now """
  tmpdir = Path(tempfile.mkdtemp())
  vocab_file = str(tmpdir.joinpath('vocab.txt'))
  dummy_vocabs = ["</s>", "<unk>", "你好", "北京"]
  save_a_vocab_file(vocab_file, dummy_vocabs)
  return vocab_file
def generate_vocab_file ( ) : tmpdir = Path ( tempfile . mkdtemp ( ) ) vocab_file = str ( tmpdir . joinpath ( 'vocab.txt' ) ) dummy_vocabs = [ "</s>" , "<unk>" , "你好", "北 京 ] save_a_vocab_file ( vocab_file , dummy_vocabs ) return vocab_file