async function embedTokens(sentences, use, batchSize, outputPath) {
  // Set up file writer for ndjson
  const fd = fs.openSync(outputPath, 'w');
  const serialize = ndjson.serialize();
  serialize.on('data', line => {
    fs.appendFileSync(fd, line, 'utf8');
  });

  const tokens = flatMap(sentences, tokenizeSentence);
  const uniqueTokens = unique(tokens);

  console.log(
      `Got ${sentences.length} sentences with` +
      ` ${tokens.length} tokens where ${uniqueTokens.length} are unique`);

  const batchedTokens = chunk(uniqueTokens, batchSize);

  for (let i = 0; i < batchedTokens.length; i++) {
    console.time(
        `Converted batch ${i} of ${batchedTokens.length} (${batchSize}): `);

    const tokensFromBatch = batchedTokens[i];
    const embedding = await use.embed(tokensFromBatch);
    const embeddingArr = await embedding.array();

    for (let j = 0; j < tokensFromBatch.length; j++) {
      serialize.write([tokensFromBatch[j], embeddingArr[j]]);
    }

    tf.dispose([embedding]);

    console.timeEnd(
        `Converted batch ${i} of ${batchedTokens.length} (${batchSize}): `);
  }

  serialize.end();
  fs.closeSync(fd);
}
Embed the input sentences using univeversal sentence encoder.
@param {string[]} sentences sentences to embed
@param {UniversalSentenceEncoder} use instance of the model
@param {number} batchSize how many tokens to embed in one call
@param {string} outputPath A path to an outputfile to write to.