Пример #1
0
        public MainWindowViewModel()
        {
            var textCategorizer = new TextCategorizer();

            this.TrainViewModel   = new TrainViewModel(textCategorizer);
            this.PredictViewModel = new PredictViewModel(textCategorizer);
        }
Пример #2
0
        public PredictViewModel(TextCategorizer textCategorizer)
        {
            this.textCategorizer = textCategorizer;

            this.LoadExampleCommand = new DelegateCommand(this.LoadExample, this.CanAct);
            this.LoadCommand        = new DelegateCommand(this.Load, this.CanAct);
            this.PredictCommand     = new DelegateCommand(this.Predict, this.CanAct);
        }
Пример #3
0
        public TrainViewModel(TextCategorizer textCategorizer)
        {
            this.textCategorizer = textCategorizer;

            this.LoadExampleCommand = new DelegateCommand(this.LoadExample, this.CanAct);
            this.TrainCommand       = new DelegateCommand(this.Train, this.CanAct);
            this.SaveCommand        = new DelegateCommand(this.Save, this.CanAct);

            this.textCategorizer.TrainProgress += OnTrainProgress;
        }