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
languageCodestringuseTokenEndboolabbreviationDictionaryDictionaryeosCharacterschar[]
Properties
AbbreviationDictionary
public virtual Dictionary? AbbreviationDictionary { get; }
Property Value
EOSCharacters
public virtual char[]? EOSCharacters { get; }
Property Value
- char[]
EndOfSentenceScanner
public virtual IEndOfSentenceScanner EndOfSentenceScanner { get; }
Property Value
IsUseTokenEnd
public virtual bool IsUseTokenEnd { get; }
Property Value
LanguageCode
public virtual string LanguageCode { get; }
Property Value
Methods
Create(string?, string, bool, Dictionary, char[])
public static SentenceDetectorFactory Create(string? subclassName, string languageCode, bool useTokenEnd, Dictionary abbreviationDictionary, char[] eosCharacters)
Parameters
subclassNamestringlanguageCodestringuseTokenEndboolabbreviationDictionaryDictionaryeosCharacterschar[]
Returns
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
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
Init(string, bool, Dictionary, char[]?)
protected virtual void Init(string languageCode, bool useTokenEnd, Dictionary abbreviationDictionary, char[]? eosCharacters)
Parameters
languageCodestringuseTokenEndboolabbreviationDictionaryDictionaryeosCharacterschar[]
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()