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

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

Powerful Powerful Machine Learning library with GPU, CPU and WASM backends
Latest
class TextVectorizer
import { TextVectorizer } from "https://deno.land/x/netsaur@0.4.2/packages/utilities/src/text/mod.ts";

Constructors

new
TextVectorizer(mode?: "tf" | "tfidf" | "indices")

Properties

optional
encoder: TfEncoder
mapper: DiscreteMapper<string>
maxLength: number
mode: "tf" | "tfidf" | "indices"
optional
transformer: TfIdfTransformer
readonly
vocabSize: number

Methods

fit(document: string | string[]): TextVectorizer
transform<DT extends DataType>(document: string | string[], dType: DT): Matrix<DT>