import re
import pandas as pd
def clean_str(string):
	string = re.sub(r"\\", "", string)
	string = re.sub(r"\'", "", string)
	string = re.sub(r"\"", "", string)
	return string.strip().lower()

data_train = pd.read_csv('labeledTrainData.csv', sep='\t')
print(data_train.shape)

texts = []
labels = []

for idx in range(data_train.review.shape[0]):
	text = BeautifulSoup(data_train.review[idx], "lxml")
	texts.append(clean_str(text.get_text().encode('ascii','ignore').decode('utf-8')))
	labels.append(data_train.seniment[idx])

3e0f38cb6323664bd1ada22b1f4285378d9f8b92
<mask token>

<mask token>


def clean_str(string):
    string = re.sub('\\\\', '', string)
    string = re.sub("\\'", '', string)
    string = re.sub('\\"', '', string)
    return string.strip().lower()


<mask token>
print(data_train.shape)
<mask token>
for idx in range(data_train.review.shape[0]):
    text = BeautifulSoup(data_train.review[idx], 'lxml')
    texts.append(clean_str(text.get_text().encode('ascii', 'ignore').decode
        ('utf-8')))
    labels.append(data_train.seniment[idx])

<mask token>


def clean_str(string):
    string = re.sub('\\\\', '', string)
    string = re.sub("\\'", '', string)
    string = re.sub('\\"', '', string)
    return string.strip().lower()


data_train = pd.read_csv('labeledTrainData.csv', sep='\t')
print(data_train.shape)
texts = []
labels = []
for idx in range(data_train.review.shape[0]):
    text = BeautifulSoup(data_train.review[idx], 'lxml')
    texts.append(clean_str(text.get_text().encode('ascii', 'ignore').decode
        ('utf-8')))
    labels.append(data_train.seniment[idx])

import re
import pandas as pd


def clean_str(string):
    string = re.sub('\\\\', '', string)
    string = re.sub("\\'", '', string)
    string = re.sub('\\"', '', string)
    return string.strip().lower()


data_train = pd.read_csv('labeledTrainData.csv', sep='\t')
print(data_train.shape)
texts = []
labels = []
for idx in range(data_train.review.shape[0]):
    text = BeautifulSoup(data_train.review[idx], 'lxml')
    texts.append(clean_str(text.get_text().encode('ascii', 'ignore').decode
        ('utf-8')))
    labels.append(data_train.seniment[idx])

import re
import pandas as pd
def clean_str(string):
	string = re.sub(r"\\", "", string)
	string = re.sub(r"\'", "", string)
	string = re.sub(r"\"", "", string)
	return string.strip().lower()

data_train = pd.read_csv('labeledTrainData.csv', sep='\t')
print(data_train.shape)

texts = []
labels = []

for idx in range(data_train.review.shape[0]):
	text = BeautifulSoup(data_train.review[idx], "lxml")
	texts.append(clean_str(text.get_text().encode('ascii','ignore').decode('utf-8')))
	labels.append(data_train.seniment[idx])
