/// <summary>
 /// Creates a new <code>SentenceDetectionEventReader</code> instance.
 /// A DefaultEndOfSentenceScanner is used to locate sentence endings.
 /// </summary>
 /// <param name="dataReader">a <code>ITrainingDataReader</code> value
 /// </param>
 public SentenceDetectionEventReader(ITrainingDataReader <string> dataReader) :
     this(dataReader, new DefaultEndOfSentenceScanner(), new SentenceDetectionContextGenerator(DefaultEndOfSentenceScanner.GetDefaultEndOfSentenceCharacters().ToArray()))
 {
 }
Beispiel #2
0
        // Constructors ------------------

        /// <summary>
        /// Constructor which takes a IMaximumEntropyModel and calls the three-arg
        /// constructor with that model, a SentenceDetectionContextGenerator, and the
        /// default end of sentence scanner.
        /// </summary>
        /// <param name="model">
        /// The MaxentModel which this SentenceDetectorME will use to
        /// evaluate end-of-sentence decisions.
        /// </param>
        public MaximumEntropySentenceDetector(IMaximumEntropyModel model) :
            this(model, new SentenceDetectionContextGenerator(DefaultEndOfSentenceScanner.GetDefaultEndOfSentenceCharacters().ToArray()), new DefaultEndOfSentenceScanner())
        {
            _sentenceProbs = new List <double>(50);
        }