code: private static TrainingParameters loadTrainingParameters(
        final String paramFile, final boolean supportSequenceTraining) {
  
      TrainingParameters params = null;
  
      if (paramFile != null) {
  
        checkInputFile("Training Parameter", new File(paramFile));
  
        InputStream paramsIn = null;
        try {
          paramsIn = new FileInputStream(new File(paramFile));
  
          params = new opennlp.tools.util.TrainingParameters(paramsIn);
        } catch (final IOException e) {
          throw new TerminateToolException(-1,
              "Error during parameters loading: " + e.getMessage(), e);
        } finally {
          try {
            if (paramsIn != null) {
              paramsIn.close();
            }
          } catch (final IOException e) {
            System.err.println("Error closing the input stream");
          }
        }
  
        if (!TrainerFactory.isValid(params.getSettings())) {
          throw new TerminateToolException(1,
              "Training parameters file '" + paramFile + "' is invalid!");
        }
      }
  
      return params;
    }
docs: Load the parameters in the {@code TrainingParameters} file.
  
  @param paramFile
  the parameter file
  @param supportSequenceTraining
  wheter sequence training is supported
  @return the parameters