Defined in File cosmos.h
MarianEmbedder takes a Marian sequence2sequence transformer model and produces sentence embeddings collected from the encoder.
Currently the model file is supposed to know how to do that.
embed(const std::string &input)¶
inputis a big string with multiple sentences separated by ‘
Returns a vector of embedding vectors in order corresponding to input sentence order.