コード例 #1
0
ファイル: jobs.py プロジェクト: abiraja2004/cuttsum
    def predict_salience(self, event, corpus, feature_set, key, model_events,
                         **kwargs):

        print "-  predicting salience..."
        sp = SaliencePredictions()
        sp.predict_salience(event, corpus, feature_set, key, model_events,
                            **kwargs)
        if not self.check_model_predictions(event, corpus, feature_set, key,
                                            model_events, **kwargs):
            raise Exception("Model prediction failed!")
コード例 #2
0
ファイル: jobs.py プロジェクト: kedz/cuttsum
    def predict_salience(self, event, corpus, feature_set, key,
                         model_events, **kwargs):

        print "-  predicting salience..."
        sp = SaliencePredictions()
        sp.predict_salience(event, corpus, feature_set, key, 
                            model_events, **kwargs)
        if not self.check_model_predictions(event, corpus, feature_set, 
                                            key, model_events, **kwargs):
            raise Exception("Model prediction failed!") 
コード例 #3
0
ファイル: jobs.py プロジェクト: abiraja2004/cuttsum
 def check_model_predictions(self, event, corpus, feature_set, key,
                             model_events, **kwargs):
     sp = SaliencePredictions()
     coverage = sp.check_coverage(event, corpus, feature_set, key,
                                  model_events, **kwargs)
     return coverage == 1
コード例 #4
0
ファイル: jobs.py プロジェクト: kedz/cuttsum
 def check_model_predictions(self, event, corpus, 
                             feature_set, key, model_events, **kwargs):
     sp = SaliencePredictions()
     coverage = sp.check_coverage(event, corpus, feature_set, 
                                  key, model_events, **kwargs)
     return coverage == 1