Closed derlin closed 5 years ago
Found it in the gensim doc:
bp.emb['<pad>']
It seems to (always ?) be an array of zeros.
Hi, not a dummy question at all. I've added this to the docstring:
This embedding is initizalized with zeros and appended to the end
of the embedding matrix. Assuming "bpemb" is a BPEmb instance, the
padding embedding can be looked up with "bpemb['<pad>']", or
directly accessed with "bpemb.vectors[-1]".
This is perfect, thanks !
Hi, This may be a dummy question, but when creating a
BPEmb
withadd_pad_emb=True
, how do I actually get the padding embedding and what is its ID ? This should maybe figure somewhere in the doc:Thanks for the great work, derlin