public FileReader(IEnumerable <ITranslationProviderLanguageDirection> tms, FinetuneBatchTaskSettings settings, int collectedSentencePairCount) { this.CollectedSentencePairCount = collectedSentencePairCount; this.settings = settings; this.FileTranslations = new List <Tuple <string, string> >(); this.FileNewSegments = new List <string>(); this.TmFuzzies = new List <TranslationUnit>(); this.tmLanguageDirections = tms; this.sourceVisitor = new FiskmoMarkupDataVisitor(); this.targetVisitor = new FiskmoMarkupDataVisitor(); }
protected override void OnInitializeTask() { this.collectedSentencePairCount = 0; this.settings = GetSetting <FinetuneBatchTaskSettings>(); this.fiskmoOptions = new FiskmoOptions(new Uri(this.settings.ProviderOptions)); //Use project guid in case no model tag specified if (this.fiskmoOptions.modelTag == "") { this.fiskmoOptions.modelTag = this.Project.GetProjectInfo().Id.ToString(); } this.tms = this.InstantiateProjectTms(); this.ProjectTranslations = new Dictionary <Language, List <Tuple <string, string> > >(); this.ProjectNewSegments = new Dictionary <Language, List <string> >(); this.ProjectFuzzies = new Dictionary <Language, List <TranslationUnit> >(); this.sourceVisitor = new FiskmoProviderElementVisitor(); this.targetVisitor = new FiskmoProviderElementVisitor(); base.OnInitializeTask(); }
public FinetuneWpfControl(FinetuneBatchTaskSettings Settings) { this.DataContext = this; //Settings is the object that is passed on to the batch task. this.Settings = Settings; //Mode defaults, changeable with radio buttons this.Settings.Finetune = true; this.Settings.PreOrderMtForNewSegments = true; //Some settings are initially held in a FiskmoOptions object (the shared properties //with the translation provider settings). this.Options = new FiskmoOptions(); //Whenever the options change, also update the option URI string in settings this.Options.PropertyChanged += Options_PropertyChanged; InitializeComponent(); this.TagBox.ItemsSource = new ObservableCollection <string>() { "<new tag>" }; }