Class DefaultEndOfSentenceScanner

Namespace
NOpenNLP.Tools.Sentdetect
Assembly
NOpenNLP.Tools.dll

Default implementation of the IEndOfSentenceScanner. It uses an character array with possible end of sentence chars to identify potential sentence endings.

public class DefaultEndOfSentenceScanner : IEndOfSentenceScanner
Inheritance
DefaultEndOfSentenceScanner
Implements
Inherited Members

Constructors

DefaultEndOfSentenceScanner(char[])

Initializes the current instance.

public DefaultEndOfSentenceScanner(char[] eosCharacters)

Parameters

eosCharacters char[]

Properties

EOSCharacters

Returns a set of character which can indicate the end of a sentence.

public virtual ISet<char> EOSCharacters { get; }

Property Value

ISet<char>

a set of character which can indicate the end of a sentence.

EndOfSentenceCharacters

Returns an array of character which can indicate the end of a sentence.

public virtual char[] EndOfSentenceCharacters { get; }

Property Value

char[]

an array of character which can indicate the end of a sentence.

Methods

GetPositions(char[])

The receiver scans `cbuf' for sentence ending characters and returns their offsets.

public virtual IList<int> GetPositions(char[] cbuf)

Parameters

cbuf char[]

a char array value

Returns

IList<int>

a List<T> of ints.

GetPositions(string)

The receiver scans the specified string for sentence ending characters and returns their offsets.

public virtual IList<int> GetPositions(string s)

Parameters

s string

a string value

Returns

IList<int>

a List<T> of ints.

GetPositions(StringBuilder)

The receiver scans `buf' for sentence ending characters and returns their offsets.

public virtual IList<int> GetPositions(StringBuilder buf)

Parameters

buf StringBuilder

a StringBuilder value

Returns

IList<int>

a List<T> of ints.