public function train(FeatureFactoryInterface $ff, TrainingSet $tset, $a_smoothing=1)
    {
        $class_set = $tset->getClassSet();

        $ctx = array(
            'termcount_per_class'=>array_fill_keys($class_set,0),
            'termcount'=>array_fill_keys($class_set,array()),
            'ndocs_per_class'=>array_fill_keys($class_set,0),
            'voc'=>array(),
            'ndocs'=>0
        );

        return $this->train_with_context($ctx,$ff,$tset,$a_smoothing);
    }