有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java无法打开mallet日志记录。属性文件

我尝试从mallet运行ParallelTopicModel类,我使用NetBeans编译它,但是当我运行代码时,我得到以下错误语句:

Couldn't open cc.mallet.util.MalletLogger resources/logging.properties file. Perhaps the 'resources' directories weren't copied into the 'class' directory.

我没有更改任何代码,仍然使用类中的原始代码:

public static void main (String[] args) {
    try {
        InstanceList training = InstanceList.load (new File(args[0]));

        int numTopics = args.length > 1 ? Integer.parseInt(args[1]) : 200;

        ParallelTopicModel lda = new ParallelTopicModel (numTopics, 50.0, 0.01);
        lda.printLogLikelihood = true;
        lda.setTopicDisplay(50, 7);
        lda.addInstances(training);

        lda.setNumThreads(Integer.parseInt(args[2]));
        lda.estimate();
        logger.info("printing state");
        lda.printState(new File("state.gz"));
        logger.info("finished printing");

    } catch (Exception e) {
        e.printStackTrace();
    }
}

我对mallet很陌生,所以我不知道这是什么意思,我该如何修复它?任何帮助都将不胜感激


共 (1) 个答案