/// <summary>
        /// Creates a new event stream based on the specified data stream using the specified context generator.
        /// </summary>
        /// <param name="samples">The data stream for this event stream.</param>
        /// <param name="cg">The context generator which should be used in the creation of events for this event stream.</param>
        public LemmaSampleEventStream(IObjectStream <LemmaSample> samples, ILemmatizerContextGenerator cg) : base(samples)
        {
            if (cg == null)
            {
                throw new ArgumentNullException(nameof(cg));
            }

            ContextGenerator = cg;
        }
Пример #2
0
        public LemmatizerME(LemmatizerModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            contextGenerator  = model.Factory.GetContextGenerator();
            sequenceValidator = model.Factory.GetSequenceValidator();

            // Knuppe: In the original implementation there is condition to recreate the beamsearch object, but
            // the condition is impossible to occur, due to the getLemmatizerSequenceModel() method logic
            this.model = model.LemmatizerSequenceModel;
        }
Пример #3
0
 public LemmaSampleSequenceStream(IObjectStream <LemmaSample> samples, ILemmatizerContextGenerator contextGenerator)
 {
     this.samples          = samples;
     this.contextGenerator = contextGenerator;
 }