Penelope v0.2.6 Penelope.ML.Text.CountVectorizer
The CountVectorizer simply counts the number of tokens in the incoming documents. It assumes that samples have already been tokenized into a list per sample. This vectorizer is useful for biasing a model for longer/shorter documents.
Link to this section Summary
Functions
transforms a list of samples (list of lists of tokens) into vectors
Link to this section Functions
Link to this function
transform(model, context, x)
transform(model :: map(), context :: map(), x :: [[String.t()]]) :: [Penelope.ML.Vector.t()]
transforms a list of samples (list of lists of tokens) into vectors