public function train(FeatureFactoryInterface $ff, TrainingSet $tset, MaxentOptimizerInterface $opt)
    {
        $classSet = $tset->getClassSet();

        $features = $this->calculateFeatureArray($classSet,$tset,$ff);
        $this->l = $opt->optimize($features);
    }