Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/dmlc/dgl
/ _read_dictionary
Function
_read_dictionary
python/dgl/data/knowledge_graph.py:250–256 ·
view source on GitHub ↗
(filename)
Source
from the content-addressed store, hash-verified
248
249
250
def
_read_dictionary(filename):
251
d = {}
252
with
open(filename,
"r+"
)
as
f:
253
for
line in f:
254
line = line.strip().split(
"\t"
)
255
d[line[1]] = int(line[0])
256
return
d
257
258
259
def
_read_triplets(filename):
Callers
1
process
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected