AverageSentenceEmbeddings

public final class AverageSentenceEmbeddings implements SentenceEmbeddings

Simply applies the average of vectors in sentence to build the sentence embedding.

Constructors

Link copied to clipboard
public AverageSentenceEmbeddings AverageSentenceEmbeddings(Embeddings tokenEmbeddings)

Functions

Link copied to clipboard
public NDArray<Float, D1> getSentenceEmbedding(List<String> sentence)
Link copied to clipboard
public List<NDArray<Float, D1>> getSentenceEmbeddings(List<List<String>> listOfSentences)
Link copied to clipboard
public Embeddings getTokenEmbeddings()

Properties

Link copied to clipboard
private final Embeddings tokenEmbeddings