Skip navigation links


A package for supervised relation and event extraction.

See: Description

Package Description

A package for supervised relation and event extraction.


The easiest way to run Machine Reading is using the following command from your javanlp directory.

bin/ --arguments

Sample properties files are included in projects/core/src/edu/stanford/nlp/ie/machinereading . Eventually, we will have one for each corpus. The attributes for the properties file are explained below:

MachineReading Properties

Required Properties

  1. datasetReaderClass: which GenericDataSetReader to use (needs to match the corpus in question). For example:
  2. serializedModelPath: where to store/load the serialized extraction model
  3. trainPath: path to the training file/directory (needs to match the datasetReaderClass)
  4. serializedTrainingSentencesPath: where to store the serialized training sentences objects (To save time loading the training data, the objects produced when reading them in are serialized.)

Optional Properties:

The following properties are optional because the code assumes default values, which it prints out if not defined.
  1. forceRetraining: retrains an extraction model even if it already exists (otherwise, we only train if the serializedModelPath doesn't exist on disk, default is false).
  2. trainOnly: if true, don't run evaluation (implies forceRetraining, default is false)
  3. The testPath and serializedTestSentencesPath properties can be omitted if trainOnly is true. Otherwise, these are analogous to their train counterparts.
  4. extractRelations: whether we should extract relations (currently ignored)
  5. extractEvents: whether we should extract events (currently ignored)
Skip navigation links

Stanford NLP Group