Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/PaddlePaddle/PaddleFormers
/ get_vocab_list
Function
get_vocab_list
tests/testing_utils.py:47–50 ·
view source on GitHub ↗
(vocab_path)
Source
from the content-addressed store, hash-verified
45
46
47
def
get_vocab_list(vocab_path):
48
with
open(vocab_path,
"r"
, encoding=
"utf-8"
)
as
f:
49
vocab_list = [vocab.rstrip(
"\n"
).split(
"\t"
)[0]
for
vocab in f.readlines()]
50
return
vocab_list
51
52
53
def
stable_softmax(x):
Callers
nothing calls this directly
Calls
1
split
Method · 0.45
Tested by
no test coverage detected