freq_representation

Functions for creating frequency based feature vector from text.

The function of interest is text_to_vector(), which creates term frequency (TF) or term frequency-inverse document frequency (TF-IDF) vectors from lists of documents. Results are output in form of a term-document matrix.

Author:Kjetil Valle <kjetilva@stud.ntnu.no>
class freq_representation.FrequencyMetrics
Class holding constants for the different frequency metrics
freq_representation.get_metrics()
Get list of available FrequencyMetrics
freq_representation.text_to_dict(docs, metric)

Create dictionaries of term frequencies based on documents

Metric must be either FrequencyMetrics.TF or FrequencyMetrics.TF_IDF.

freq_representation.text_to_vector(docs, metric)

Create frequency based feature-vector from text

Metric must be either FrequencyMetrics.TF or FrequencyMetrics.TF_IDF.

Previous topic

stanford_parser

Next topic

graph_representation

This Page