Properties File

From WekaWiki

(Redirected from Properties file)

A properties file is a simple text file with this structure:

<key>=<value>

Notes:

  • Comments start with the hash sign #.
  • Backslashes within values need to be doubled (the backslashes get interpreted already when a property is read).

To make a rather long property line more readable, one can use a backslash to continue on the next line. The Filter property, e.g., looks like this:

weka.filters.Filter= \
 weka.filters.supervised.attribute, \
 weka.filters.supervised.instance, \
 weka.filters.unsupervised.attribute, \
 weka.filters.unsupervised.instance

Precedence

The Weka property files (extension .props) are searched for in the following order:

  1. current directory
  2. the user's home directory (*nix $HOME, Windows %USERPROFILE%, Cygwin $USERPROFILE)
  3. the class path (normally the weka.jar file)

If Weka encounters those files it only supplements the properties, never overrides them. In other words, a property in the property file of the current directory has a higher precedence than the one in the user's home directory.

Note: Under Cywgin (http://cygwin.com/), the home directory is still the Windows one, since the java installation will be still one for Windows.

See also

Further information about specific props files: