Esempio n. 1
0
 def train_models(self, event, corpus, feature_set, **kwargs):
     print "-  training salience models..."
     sm = SalienceModels()
     sm.train_models(event, corpus, feature_set, self.key, **kwargs)
     if not self.check_model_pipeline(event, corpus, feature_set, **kwargs):
         raise Exception("Model training failed!")
Esempio n. 2
0
 def check_model_pipeline(self, event, corpus, feature_set, **kwargs):
     sm = SalienceModels()
     coverage = sm.check_coverage(event, corpus, feature_set, self.key,
                                  **kwargs)
     return coverage == 1