(self, sentence, tags)
| 276 | return path_score, best_path |
| 277 | |
| 278 | def neg_log_likelihood(self, sentence, tags): |
| 279 | feats = self._get_lstm_features(sentence) |
| 280 | forward_score = self._forward_alg(feats) |
| 281 | gold_score = self._score_sentence(feats, tags) |
| 282 | return forward_score - gold_score |
| 283 | |
| 284 | def forward(self, sentence): # dont confuse this with _forward_alg above. |
| 285 | # Get the emission scores from the BiLSTM |
no test coverage detected