public void SetDefaults() { segmenter = ComponentCreator.MakeComponent<ISegmentLine>("DpSegmenter"); grouper = ComponentCreator.MakeComponent<IGrouper>("SimpleGrouper"); cmodel = null; best = 10; maxcost = 30.0f; reject_cost = 10.0f; min_height = 0.5f; rho_scale = 1.0f; maxoverlap = 0.8f; spacemodel = new SimpleSpaceModel(); //linemodel = null; }
private void TryAttachJunkClassifierEvent(IModel classifier) { if (classifier != null && !junkTrainRoundAttached) { classifier.TrainRound += new TrainEventHandler(JunkClass_TrainRound); junkTrainRoundAttached = true; } }
private void TryAttachCharClassifierEvent(IModel classifier) { if (classifier != null && !charTrainRoundAttached) { classifier.TrainRound += new TrainEventHandler(CharClass_TrainRound); charTrainRoundAttached = true; } }
public override void SetModel(IModel cf, int which) { if (which == 0) charclass.SetComponent(cf); else if (which == 1) ulclass.SetComponent(cf); }
public void SetClassifier(IModel classifier) { this.classifier.Object = classifier; if (this.classifier.Object != null) this.classifier.Object.SetExtractor(PGet("extractor")); TryAttachClassifierEvent(classifier); }
public virtual void Copy(IModel model) { throw new NotImplementedException(); }
public virtual void SetModel(IModel model, int i) { throw new Exception(String.Format("[{0}.SetModel] no submodels", Name)); }