Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netsaur/packages/utilities/src/text/mod.ts>MultiHotVectorizer

Powerful machine learning, accelerated by WebGPU
Go to Latest
class MultiHotVectorizer
import { MultiHotVectorizer } from "https://deno.land/x/netsaur@0.4.0-patch/packages/utilities/src/text/mod.ts";

Convert tokens into vectors based on term frequency

Constructors

new
MultiHotVectorizer(vocabSize: number)

Methods

transform<T extends DataType>(tokens: number[][], dType: T): Matrix<T>

Convert a document (string | array of strings) into vectors.