def __init__(self): data = GetDataLocation() self.data_path = data.get_path() predict = Prediction() self.pred = predict return
def __init__(self): data = GetDataLocation() self.data_path = data.get_path() neg1 = open(os.path.join(self.data_path, "neg"), "r").read().lower().replace("'", "").splitlines() eneg = open(os.path.join(self.data_path, "neg_emo"), "r").read().lower().replace("'", "").splitlines() hneg = open(os.path.join(self.data_path, "neg_hash"), "r").read().lower().replace("'", "").splitlines() dneg = open(os.path.join(self.data_path, "neg_n't"), "r").read().lower().replace("'", "").splitlines() oneg = open(os.path.join(self.data_path, "neg_other"), "r").read().lower().replace("'", "").splitlines() sneg = open(os.path.join(self.data_path, "neg_slang"), "r").read().lower().replace("'", "").splitlines() pos1 = open(os.path.join(self.data_path, "pos"), "r").read().lower().replace("'", "").splitlines() epos = open(os.path.join(self.data_path, "pos_emo"), "r").read().lower().replace("'", "").splitlines() hpos = open(os.path.join(self.data_path, "pos_hash"), "r").read().lower().replace("'", "").splitlines() opos = open(os.path.join(self.data_path, "pos_other"), "r").read().lower().replace("'", "").splitlines() spos = open(os.path.join(self.data_path, "pos_slang"), "r").read().lower().replace("'", "").splitlines() self.neg = neg1+oneg+dneg+sneg+hneg+eneg self.pos = pos1+opos+spos+hpos+epos self.decode = HtmlCharacterConvert() return