import os
import numpy as np
from sqlalchemy import create_engine
from urllib.parse import quote
############
## Config ##
############
class ParamConfig:
global path_main
path_main = '//IPE//ML//'
def __init__(self,prediction,subject,Forcasting):
#global path_main
#Pandas config
self.file_delimiter = "|"
self.encoding = "ISO-8859-1"
self.error_bad_lines = False
self.engine = ""
self.tenant_id = "DEMO"
self.data_path =path_main + '//Data//'
self.data_file_name = 'sourcing_qa.csv'
self.context_data = 'df_act_context.joblib'
self.engine_train_data = create_engine('postgresql://ml_user:%s@10.32.77.4:5432/tap'%quote('asdfghjkloip'),encoding="utf-8")
#self.engine_train_data = create_engine('postgresql://ml_user:Go@*1961##36@10.72.209.36:5432/tap',encoding="utf-8")
self.system_path =path_main
self.archive_path =path_main + '//Archive//'
self.tenant_path =path_main + 'Axys//'
self.global_vector_name = 'glove.50d.txt'
#pickle Folder path
self.model_folder_name =path_main + '//Model//'
self.model_tfidf = "tfidf.joblib"
self.model_tf_count = "tf_count.joblib"
self.model_tfidf_vector = "tfidf_vector.joblib"
self.model_tf_count_vector = "tf_countvector.joblib"
#self.daily_tfidf_vector = "Daily_tfidf.joblib"
#self.daily_tf_count_vector = "Daily_tf_count.joblib"
self.raw_data = "raw_data.joblib"
self.req_cols = ['event_id','event_type','event_start_date','event_status','event_title']
self.daily_req_cols = ['event_id','event_type','event_start_date','event_status','event_title','clean_text_event_title']
self.target_column = 'event_title'
self.noun_column ='Noun'
self.model_matching_data_train = 'unique_train_data_matrix.joblib'
self.glove_vector_dict = 'glove_vector_dict.joblib'
self.engine_ipe = create_engine('postgresql://analytics_user:%s@10.32.77.218:5432/tap_ods'%quote('adgjkkjb'),encoding="utf-8")
#Threshold_config
self.fuzzy_threshold = 75
self.tf_threshold = 0.38
self.max_reccom = 10
###########################
## initialize a param config
config = ParamConfig(prediction=True,subject='Event Sourcing',Forcasting="Event Sourcing")