void allocModel() throws Exception { /* * A CRF model consists of features and corresponding weights. The * features are stored in FeatureGenImpl and weights and other CRF * parameters are encapsulated in CRF object. * * Here, you will call appropriate constructor for a feature generator * and a CRF model. You can use feature generator available in the * package or use your own implemented feature generator. * * There are two CRF model classes: CRF and NestedCRF. The CRF class is * flat CRF model while NestedCRF is a segment(semi-)CRF model. */ featureGen = new FeatureGenImpl(options.getProperty("modelGraph"), Integer.parseInt(options.getProperty("numLabels"))); crfModel = new CRF(featureGen.numFeatures(), featureGen, options); }