Mute Stanford coreNLP logging

后端 未结 5 1777
深忆病人
深忆病人 2021-01-14 20:42

First of all, Java is not my usual language, so I\'m quite basic at it. I need to use it for this particular project, so please be patient, and if I have omitted any relevan

5条回答
  •  醉梦人生
    2021-01-14 21:24

    If I understand your problem, you want to disable all StanfordNLP logging message while the program is executing.

    You can disable the logging message. Redwood logging framework is used as logging framework in Stanford NLP. First, clear the Redwood's default configuration(to display log message) then create StanfordNLP pipeline.

    import edu.stanford.nlp.util.logging.RedwoodConfiguration;
    RedwoodConfiguration.current().clear().apply();
    StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
    

    Hope it helps.

提交回复
热议问题