encode(tokens) {
        const toReturn = [];
        for (const token of tokens) {
            const tokenized = this.tokenize(token);
            toReturn.push(...tokenized);
        }
        return toReturn;
    }
Encodes an array of tokens using Unigram encoding.
@param {string[]} tokens The tokens to encode.
@returns {string[]} An array of encoded tokens.