Esempio n. 1
0
        /// <summary>Train a segmenter from raw text.</summary>
        /// <remarks>Train a segmenter from raw text. Gold segmentation markers are required.</remarks>
        public virtual void Train()
        {
            bool hasSegmentationMarkers = true;
            bool hasTags = true;
            IDocumentReaderAndWriter <CoreLabel> docReader = new ArabicDocumentReaderAndWriter(hasSegmentationMarkers, hasTags, hasDomainLabels, domain, noRewrites, tf);
            ObjectBank <IList <CoreLabel> >      lines     = classifier.MakeObjectBankFromFile(flags.trainFile, docReader);

            classifier.Train(lines, docReader);
            log.Info("Finished training.");
        }