print 'preProcessing Jobs...', time.ctime()
        start_time = time.time()
        htmls = HTMLStripper()

        #############################################
        '''Status Check'''
        #############################################

        print 'Connecting to Mongodb..'
        tableName = 'jobs_status_check'
        monconn_status_check = MongoConnect(tableName,
                                            host='localhost',
                                            database='jam_status')
        monconn_status_check_cur = monconn_status_check.getCursor()
        monconn_status_check.dropTable()
        del (monconn_status_check)
        #monconn_status_check.saveToTable({'_id':1,'status':0})

        ######################################
        '''Load the mapping for Bag of Words'''
        ######################################

        print 'Loading the mappings for bow'
        synMappingFileName = '../Features/rawData/LSI/Model_UnifiedTKE/unifiedtkelist.csv'
        keywordIdMappingFileName = '../Features/rawData/LSI/Model_UnifiedTKE/unifiedtkelist_numbered.csv'  #This file is created
        mb = MyBOW(synMappingFileName, keywordIdMappingFileName)
        print 'Loading the mappings for bow...finished'

        print 'Connecting to Mongodb..'
        tableName = 'jobs_status_check'
Beispiel #2
0
        print 'Loading the mappings for bow'
        synMappingFileName = '../Features/rawData/LSI/Model_UnifiedTKE/unifiedtkelist.csv'
        keywordIdMappingFileName = '../Features/rawData/LSI/Model_UnifiedTKE/unifiedtkelist_numbered.csv'  #This file is created
        mb = MyBOW(synMappingFileName, keywordIdMappingFileName)
        print 'Loading the mappings for bow...finished'

        #########################################################################################################
        ############-----------------    Dropping the existing collection of Jobs
        #########################################################################################################
        print 'Connecting to Mongodb..'
        tableName = 'jobs_processed'
        monconn_jobs_local = MongoConnect(tableName,
                                          host='localhost',
                                          database='mailer_weekly')
        monconn_jobs_local_cur = monconn_jobs_local.getCursor()
        monconn_jobs_local.dropTable()
        print 'Connecting to Mongodb...finished'
        del (monconn_jobs_local)

        #########################################################################################################
        ############----------------- Initiating Multiprocessing and extracting Jobs
        ############----------------- Set flag pprocessing = 1 for multiprocessing (avoid)
        #########################################################################################################
        numChunks = 100
        chunkIDs = range(0, numChunks)
        print chunkIDs
        pprocessing = 0
        if pprocessing == 0:
            preProcessChunk(1)
            pass
        else:
Beispiel #3
0
        ], "Revival Monthly", "Recommendation Generation Started !!")

        #########################################################################################################
        ############-----------------  Start the timer
        #########################################################################################################
        start_time = time.time()
        print "Started at time", start_time, "seconds"

        #########################################################################################################
        ############-----------------  Drop the existing collection
        #########################################################################################################
        tablename = 'MonthlyMsgQueue'
        monconn_recommendations = MongoConnect(tablename,
                                               host='localhost',
                                               database='mailer_monthly')
        monconn_recommendations.dropTable()
        monconn_recommendations.close()

        #########################################################################################################
        ############-----------------  Load the LSI and tfidf models
        #########################################################################################################
        tfIdfModelFilename_unifiedtke = '/data/Projects/JobAlerts/Model/tfidf_model.tfidf'
        lsiModelFilename_unifiedtke = '/data/Projects/JobAlerts/Model/lsi_model.lsi'

        tfIdfModel = gensim.models.tfidfmodel.TfidfModel.load(
            tfIdfModelFilename_unifiedtke)
        lsiModel = models.lsimodel.LsiModel.load(lsiModelFilename_unifiedtke)

        #########################################################################################################
        ############-----------------  Load the city Mapping in RAM
        #########################################################################################################
Beispiel #4
0
        #os.system(' echo "Application Indexing Started.... '' " | mutt -s "Similar Jobs Mailer" [email protected],[email protected], [email protected]')
        send_email([
            '*****@*****.**',
            '*****@*****.**'
        ], "Similar Jobs Mailer applies preprocessing",
                   'Application Indexing Started.... !!')
        #send_email(['*****@*****.**'],"Similar Jobs Mailer applies preprocessing",'Application Indexing Started.... !!')
        #############################
        'Dropping the old collection'
        #############################
        tablename = "apply_data"
        monconn_user = MongoConnect(tablename,
                                    host='172.22.66.198',
                                    database='SimilarJobs')
        monconn_user.dropTable()
        monconn_user.close()

        #############################
        'Starting Index Creation'
        #############################
        ApplicationIndexing()

        #############################
        'Creating Index on Collection'
        #############################
        tablename = "apply_data"
        monconn_user = MongoConnect(tablename,
                                    host='172.22.66.198',
                                    database='SimilarJobs')
        monconn_user.doIndexing('user_index')