def predict(self, sent, unit, feats):
     score = self.__get_scores_for_MST(sent, unit, self.model, self.model.map_feature, feats)
     graph = MST(score)
     sent.add_unitheads(graph.edges())
     # use to check unit accuracy
     # sent.add_heads(graph.edges())
     return sent
 def predict(self, sent, feats, factor = 1.0):
     score = self.__get_scores_for_MST(sent, self.model, self.model.map_feature, feats, factor)
     graph = MST(score)
     sent.add_heads(graph.edges())
     return sent