Class SentenceDetectorFactory

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

The factory that provides SentenceDetecor default implementations and resources

public class SentenceDetectorFactory : BaseToolFactory
Inheritance
SentenceDetectorFactory
Inherited Members

Constructors

SentenceDetectorFactory()

Creates a SentenceDetectorFactory that provides the default implementation of the resources.

public SentenceDetectorFactory()

SentenceDetectorFactory(string, bool, Dictionary, char[]?)

Creates a SentenceDetectorFactory. Use this constructor to programmatically create a factory.

public SentenceDetectorFactory(string languageCode, bool useTokenEnd, Dictionary abbreviationDictionary, char[]? eosCharacters)

Parameters

languageCode string
useTokenEnd bool
abbreviationDictionary Dictionary
eosCharacters char[]

Properties

AbbreviationDictionary

public virtual Dictionary? AbbreviationDictionary { get; }

Property Value

Dictionary

EOSCharacters

public virtual char[]? EOSCharacters { get; }

Property Value

char[]

EndOfSentenceScanner

public virtual IEndOfSentenceScanner EndOfSentenceScanner { get; }

Property Value

IEndOfSentenceScanner

IsUseTokenEnd

public virtual bool IsUseTokenEnd { get; }

Property Value

bool

LanguageCode

public virtual string LanguageCode { get; }

Property Value

string

Methods

Create(string?, string, bool, Dictionary, char[])

public static SentenceDetectorFactory Create(string? subclassName, string languageCode, bool useTokenEnd, Dictionary abbreviationDictionary, char[] eosCharacters)

Parameters

subclassName string
languageCode string
useTokenEnd bool
abbreviationDictionary Dictionary
eosCharacters char[]

Returns

SentenceDetectorFactory

CreateArtifactMap()

Creates an IDictionary<TKey, TValue> with pairs of keys and objects. The models implementation should call this constructor that creates a model programmatically.

The base implementation will return a Dictionary<TKey, TValue> that should be populated by sub-classes.

public override IDictionary<string, object> CreateArtifactMap()

Returns

IDictionary<string, object>

CreateManifestEntries()

Creates the manifest entries that will be added to the model manifest

public override IDictionary<string, string> CreateManifestEntries()

Returns

IDictionary<string, string>

the manifest entries to added to the model manifest

GetSDContextGenerator()

public virtual ISDContextGenerator GetSDContextGenerator()

Returns

ISDContextGenerator

Init(string, bool, Dictionary, char[]?)

protected virtual void Init(string languageCode, bool useTokenEnd, Dictionary abbreviationDictionary, char[]? eosCharacters)

Parameters

languageCode string
useTokenEnd bool
abbreviationDictionary Dictionary
eosCharacters char[]

ValidateArtifactMap()

Validates the parsed artifacts. If something is not valid subclasses should throw an InvalidFormatException.

Note: Subclasses should generally invoke super.validateArtifactMap at the beginning of this method.

public override void ValidateArtifactMap()

Exceptions

InvalidFormatException