public FgModel train ( LogLinearXYData data ) { IntObjectBimap < String > alphabet = data . getFeatAlphabet ( ) ; FgExampleList list = getData ( data ) ; log . info ( "Number of train instances: " + list . size ( ) ) ; log . info ( "Number of model parameters: " + alphabet . size ( ) ) ; FgModel model = new FgModel ( alphabet . size ( ) , new StringIterable ( alphabet . getObjects ( ) ) ) ; CrfTrainer trainer = new CrfTrainer ( prm . crfPrm ) ; trainer . train ( model , list ) ; return model ; }
Trains a log - linear model .