code: private final POSTaggerFactory getTrainerFactory(
        final TrainingParameters params) {
      POSTaggerFactory posTaggerFactory = null;
      final String featureSet = Flags.getFeatureSet(params);
      Dictionary ngramDictionary = null;
      if (Flags.getNgramDictFeatures(params) != Flags.DEFAULT_DICT_CUTOFF) {
        ngramDictionary = createNgramDictionary(getDictSamples(),
            getNgramDictCutOff());
      }
      if (featureSet.equalsIgnoreCase("Opennlp")) {
        try {
          posTaggerFactory = POSTaggerFactory.create(
              POSTaggerFactory.class.getName(), ngramDictionary, null);
        } catch (final InvalidFormatException e) {
          e.printStackTrace();
        }
      } else {
        try {
          posTaggerFactory = POSTaggerFactory.create(
              BaselineFactory.class.getName(), ngramDictionary, null);
        } catch (final InvalidFormatException e) {
          e.printStackTrace();
        }
      }
      return posTaggerFactory;
    }
docs: Instantiate the {@code POSTaggerFactory} according to the features
  specified in the parameters properties file.
  
  @param params
  the training parameters
  @return the factory