in src/models/TokenizedDataset.js [29:37]
encode(token) {
if (this.vocabularies.hasOwnProperty(token)) {
return this.vocabularies[token];
}
const code = this.itemset.length;
this.itemset.push(token);
this.vocabularies[token] = code;
return code;
}