qxencoder
Wrapper around tensorflowjs universal sentence encoder.
Installation
npm i qxencoder
Usage
const encode Encoder = ; async { const sentences = 'Hello' 'Bye'; // Simple encoding var embeddings = await ; console; // [ 512, 512 ] // Encoder usage // Works the same as above, but only load model once so slightly faster var encoder = ; await encoder; embeddings = encoder; };