next_token_lm
allennlp_models.lm.predictors.next_token_lm
NextTokenLMPredictor#
@Predictor.register("next_token_lm")
class NextTokenLMPredictor(Predictor)
predict#
class NextTokenLMPredictor(Predictor):
| ...
| def predict(self, sentence: str) -> JsonDict
predictions_to_labeled_instances#
class NextTokenLMPredictor(Predictor):
| ...
| def predictions_to_labeled_instances(
| self,
| instance: Instance,
| outputs: Dict[str, numpy.ndarray]
| )