BalanceData: Clean text and build term matrix for bag of words model or TF...

Description Usage Arguments Value Author(s) Examples

Description

Clean text and build term matrix for bag of words model or TF DFI.

Usage

1
BalanceData(dataset)

Arguments

dataset

unbalanced dataset, a dataframe : two column: first text reviews and second binary class, label: negative =0 and positive=1.

Value

balanced_dataframe balanced dataframe containing two columns: review texts and binary class , label: negative =0 and positive=1.

A balanced dataframe

Author(s)

Zahra Khoshmanesh

Examples

1
2
3
4
5
6
## Not run: 
library("SentiAnalyzer")
direction <- system.file(package = "SentiAnalyzer", "extdata/Imbalance_Restaurant_Reviews.tsv")
imbalance_data<- read.delim(direction,quote='',stringsAsFactors = FALSE)
BalanceData(imbalance_data)
## End(Not run)

zahrakhoshmanesh/FinalProjectSTAT585 documentation built on June 4, 2019, 1:57 p.m.