def execute(self, data_path): assert data_path is not None self.logger.info( '--------------------------------------------------------------------------------' ) self.logger.info('Preparing data for client...') self.logger.info(' data_path = %s', data_path) self.logger.info('Connecting to data...') self.model = ModelAPI(data_path) self.saliency = SaliencyAPI(data_path) self.seriation = SeriationAPI(data_path) self.client = ClientAPI(data_path) self.logger.info('Reading data from disk...') self.model.read() self.saliency.read() self.seriation.read() self.logger.info('Preparing parameters for seriated matrix...') self.prepareSeriatedParameters() self.logger.info('Preparing parameters for filtered matrix...') self.prepareFilteredParameters() self.logger.info('Preparing global term freqs...') self.prepareGlobalTermFreqs() self.logger.info('Writing data to disk...') self.client.write()
def execute(self, data_path, numSeriatedTerms=None): assert data_path is not None if numSeriatedTerms is None: numSeriatedTerms = ComputeSeriation.DEFAULT_NUM_SERIATED_TERMS self.logger.info( '--------------------------------------------------------------------------------' ) self.logger.info('Computing term seriation...') self.logger.info(' data_path = %s', data_path) self.logger.info(' number_of_seriated_terms = %d', numSeriatedTerms) self.logger.info('Connecting to data...') self.saliency = SaliencyAPI(data_path) self.similarity = SimilarityAPI(data_path) self.seriation = SeriationAPI(data_path) self.logger.info('Reading data from disk...') self.saliency.read() self.similarity.read() self.logger.info('Reshaping saliency data...') self.reshape() self.logger.info('Computing seriation...') self.compute(numSeriatedTerms) self.logger.info('Writing data to disk...') self.seriation.write() self.logger.info( '--------------------------------------------------------------------------------' )
def execute(self, data_path): assert data_path is not None self.logger.info( '--------------------------------------------------------------------------------' ) self.logger.info('Computing term saliency...') self.logger.info(' data_path = %s', data_path) self.logger.info('Connecting to data...') self.model = ModelAPI(data_path) self.saliency = SaliencyAPI(data_path) self.logger.info('Reading data from disk...') self.model.read() self.logger.info('Computing...') self.computeTopicInfo() self.computeTermInfo() self.rankResults() self.logger.info('Writing data to disk...') self.saliency.write() self.logger.info( '--------------------------------------------------------------------------------' )