Skip to content

write_srl_predictions_to_conll_format

allennlp_models.structured_prediction.tools.write_srl_predictions_to_conll_format

[SOURCE]


flake8: noqa

main#

def main(
    serialization_directory: str,
    device: int,
    data: str,
    prefix: str,
    domain: str = None
)

serialization_directory : str, required. The directory containing the serialized weights. device: int, default = -1 The device to run the evaluation on. data: str, default = None The data to evaluate on. By default, we use the validation data from the original experiment. prefix: str, default="" The prefix to prepend to the generated gold and prediction files, to distinguish different models/data. domain: str, optional (default = None) If passed, filters the ontonotes evaluation/test dataset to only contain the specified domain. This overwrites the domain in the config file from the model, to allow evaluation on domains other than the one the model was trained on.