Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class CountVectorizer
import { CountVectorizer } from "https://deno.land/x/netsaur@0.4.0-patch/packages/utilities/src/text/preprocess/vectorize/count_vectorizer.ts";

Convert tokens into vectors based on term frequency

Constructors

new
CountVectorizer(vocabSize: number)

Methods

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

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