MCPcopy
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
18def encode_text(words, vocab_indices):
19 return [vocab_indices[word] for word in words if word in vocab_indices]
20
21
22def decode_text(labels, vocabs, end_token = '</s>'):

Callers 1

_init_readerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected