/// <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()))
 {
 }
 /// <summary>
 /// Class constructor which uses the EndOfSentenceScanner to locate
 /// sentence endings.
 /// </summary>
 public SentenceDetectionEventReader(SharpEntropy.ITrainingDataReader <string> dataReader, IEndOfSentenceScanner scanner) : this(dataReader, scanner, new SentenceDetectionContextGenerator(DefaultEndOfSentenceScanner.GetEndOfSentenceCharacters()))
 {
 }
Beispiel #3
0
		/// <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(SharpEntropy.IMaximumEntropyModel model) : this(model, new SentenceDetectionContextGenerator(DefaultEndOfSentenceScanner.GetEndOfSentenceCharacters()), new DefaultEndOfSentenceScanner())
		{
            mSentenceProbs = new List<double>(50);
		}