Failed to open mallog logging.properties file

I try to run the ParallelTopicModel class from mallet, I use NetBeans to compile it, but when I run the code, I get this error expression:

Failed to open cc.mallet.util.MalletLogger resources / logging.properties file. The resource directories may not have been copied to the class directory.

I don’t change the code anyway, I still use the original from the class:

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();
    }
}

I am very new to the hammer, so I don’t know what this means, and how can I fix it? Any help would be appreciated.

+4
source share
1 answer

Mallet is looking for a Java property java.util.logging.config.file. If he does not find it, he searches for the file resources/logging.properties, and if he does not find that he gives an error that you saw.

Mallet https://github.com/mimno/Mallet/blob/master/src/cc/mallet/util/resources/logging.properties.

NetBeans , Java.

0

Source: https://habr.com/ru/post/1690929/


All Articles