mallet-logging | R Documentation |
By default, MALLET provides a quite verbose continual report on the progress
of the modeling process. This is normally useful, but sometimes you might
prefer for the log to be saved to disk or suppressed altogether.
Unfortunately the interaction between R and MALLET makes this difficult to
configure: console output from rJava cannot be easily captured or
redirected. But MALLET has built-in logging configuration options. The
package option dfrtopics.mallet_logging
can be set to change MALLET's
behavior in this regard. The option must be set before any MALLET
functions are invoked (e.g. via make_instances
or
train_model
). The option has the following possible settings:
"default"
or "console"
The MALLET default (verbose console output).
"file"
Output appended to a file named mallet0.log
in the working
directory (this file is created if necessary). No limit is placed on the
size of the log file, which might therefore grow very large.
"none"
or "off"
Logging suppressed.
c("console", "file")
Both file and console logging.
The path is normalized and given to Java as the value of the system property
java.util.logging.config.file
. The file should be a Java Properties
file that adjusts Java's logging settings. For examples, see
list.files(system.file("javaconfig", package="dfrtopics"))
, or
extract the mallet default logging.properties
to the working
directory as follows: unzip(system.file("java", "mallet.jar",
package="mallet"), "cc/mallet/util/resources/logging.properties",
junkpaths=T)
.
dfrtopics does some additional messaging of its own, which can be suppressed
as usual with suppressMessages
or globally by setting
options(dfrtopics.verbose=F)
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.