-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
30 lines (22 loc) · 1.12 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from config.labels_constants import *
from config.data_constants import *
import pandas as pd
from utils.most_significant import *
from utils.new_preprocessing import *
def main():
#Train labels most significant
train_most_significant = getMostSignificantLabel(DATA_PATH + TRAIN_LABELS_NAME, LABELS_SEPERATOR, LABELS_NAMES)
print("Train Most Significant: ", train_most_significant)
#Test labels most significant
test_most_significant = getMostSignificantLabel(DATA_PATH + TEST_LABELS_NAME, LABELS_SEPERATOR, LABELS_NAMES)
print("Test Most Significant: ", test_most_significant)
#Preprocessing train file
convert_labels_to_binary(DATA_PATH + TRAIN_LABELS_NAME, 2,
DATA_PATH + "new_" + TRAIN_LABELS_NAME)
convert_labels_to_binary(DATA_PATH + TEST_LABELS_NAME, 2,
DATA_PATH + "new_" + TEST_LABELS_NAME)
#convert_sentences_to_binary("./data/train-sentlabel.dat", 2, "./data/new_train-sentlabel.dat")
convert_sentences_to_binary(
"./data/test-sentlabel.dat", 2, "./data/new_test-sentlabel.dat")
import utils.experimentScript
main()