/// <summary> /// Class constructor which takes the string locations of the /// information which the maxent model needs. /// </summary> public MaximumEntropyTokenizer(IMaximumEntropyModel model) { _contextGenerator = new TokenContextGenerator(); AlphaNumericOptimization = false; this._model = model; _newTokens = new List <Span>(); _tokenProbabilities = new List <double>(50); }
/// <summary> /// Creates a new <code>MaximumEntropySentenceDetector</code> instance. /// </summary> /// <param name="model"> /// The IMaximumEntropyModel which this MaximumEntropySentenceDetector will use to /// evaluate end-of-sentence decisions. /// </param> /// <param name="contextGenerator">The IContextGenerator object which this MaximumEntropySentenceDetector /// will use to turn strings into contexts for the model to /// evaluate. /// </param> /// <param name="scanner">the EndOfSentenceScanner which this MaximumEntropySentenceDetector /// will use to locate end of sentence indexes. /// </param> public MaximumEntropySentenceDetector(IMaximumEntropyModel model, IContextGenerator <Tuple <StringBuilder, int> > contextGenerator, IEndOfSentenceScanner scanner) { _model = model; _contextGenerator = contextGenerator; _scanner = scanner; }
/// <summary> /// Constructor which takes a IMaximumEntropyModel and a IContextGenerator. /// calls the three-arg constructor with a default ed of sentence scanner. /// </summary> /// <param name="model"> /// The MaxentModel which this SentenceDetectorME will use to /// evaluate end-of-sentence decisions. /// </param> /// <param name="contextGenerator"> /// The IContextGenerator object which this MaximumEntropySentenceDetector /// will use to turn strings into contexts for the model to /// evaluate. /// </param> public MaximumEntropySentenceDetector(IMaximumEntropyModel model, IContextGenerator <Tuple <StringBuilder, int> > contextGenerator) : this(model, contextGenerator, new DefaultEndOfSentenceScanner()) { }
public MaximumEntropySentenceDetector(IMaximumEntropyModel model, IEndOfSentenceScanner scanner) : this(model, new SentenceDetectionContextGenerator(scanner.GetPotentialEndOfSentenceCharacters().ToArray()), scanner) { }
// 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 DefaultEndOfSentenceScanner()) { }
// 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 MaximumEntropyInvalidEmailDetector(IMaximumEntropyModel model) { _contextGenerator = new InvalidEmailDetectionContextGenerator(); _model = model; }
public MaxentTokenizer(SharpEntropy.IO.IGisModelReader modelReader) { mModel = new GisModel(modelReader); }
/// <summary> /// Constructor which takes a IMaximumEntropyModel and a IContextGenerator. /// calls the three-arg constructor with a default ed of sentence scanner. /// </summary> /// <param name="model"> /// The MaxentModel which this SentenceDetectorME will use to /// evaluate end-of-sentence decisions. /// </param> /// <param name="contextGenerator"> /// The IContextGenerator object which this MaximumEntropySentenceDetector /// will use to turn strings into contexts for the model to /// evaluate. /// </param> public MaximumEntropySentenceDetector(IMaximumEntropyModel model, IContextGenerator<Tuple<StringBuilder, int>> contextGenerator): this(model, contextGenerator, new DefaultEndOfSentenceScanner()){}
/// <summary> /// Class constructor which takes the string locations of the /// information which the maxent model needs. /// </summary> public MaximumEntropyTokenizer(IMaximumEntropyModel model) { _contextGenerator = new TokenContextGenerator(); AlphaNumericOptimization = false; this._model = model; }
/// <summary> /// Class constructor which takes the string locations of the /// information which the maxent model needs. /// </summary> public MaximumEntropyTokenizer(IMaximumEntropyModel model) { _contextGenerator = new TokenContextGenerator(); AlphaNumericOptimization = false; this._model = model; _newTokens = new List<Span>(); _tokenProbabilities = new List<double>(50); }
// 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); }
public MaximumEntropySentenceDetector(IMaximumEntropyModel model, IEndOfSentenceScanner scanner): this(model, new SentenceDetectionContextGenerator(scanner.GetPotentialEndOfSentenceCharacters().ToArray()), scanner){ }
// 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 DefaultEndOfSentenceScanner()){}
/// <summary> /// Creates a new <code>MaximumEntropySentenceDetector</code> instance. /// </summary> /// <param name="model"> /// The IMaximumEntropyModel which this MaximumEntropySentenceDetector will use to /// evaluate end-of-sentence decisions. /// </param> /// <param name="contextGenerator">The IContextGenerator object which this MaximumEntropySentenceDetector /// will use to turn strings into contexts for the model to /// evaluate. /// </param> /// <param name="scanner">the EndOfSentenceScanner which this MaximumEntropySentenceDetector /// will use to locate end of sentence indexes. /// </param> public MaximumEntropySentenceDetector(IMaximumEntropyModel model, IContextGenerator<Tuple<StringBuilder, int>> contextGenerator, IEndOfSentenceScanner scanner) { _model = model; _contextGenerator = contextGenerator; _scanner = scanner; }
public MaxentTokenizer(string modelFile) { mModel = new GisModel(new BinaryGisModelReader(modelFile)); }
// 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.GetEndOfSentenceCharacters()), new DefaultEndOfSentenceScanner()) { _sentenceProbs = new List<double>(50); }