Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/wb14123/seq2seq-couplet
/ encode_text
Function
encode_text
reader.py:18–19 ·
view source on GitHub ↗
(words, vocab_indices)
Source
from the content-addressed store, hash-verified
16
17
18
def
encode_text(words, vocab_indices):
19
return
[vocab_indices[word]
for
word in words
if
word in vocab_indices]
20
21
22
def
decode_text(labels, vocabs, end_token =
'</s>'
):
Callers
1
_init_reader
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected