Class SentenceModel
- Namespace
- NOpenNLP.Tools.Sentdetect
- Assembly
- NOpenNLP.Tools.dll
The SentenceModel is the model used by a learnable ISentenceDetector.
public class SentenceModel : BaseModel, IArtifactProvider
- Inheritance
-
SentenceModel
- Implements
- Inherited Members
Constructors
SentenceModel(FileInfo)
public SentenceModel(FileInfo modelFile)
Parameters
modelFileFileInfo
SentenceModel(Stream)
public SentenceModel(Stream @in)
Parameters
inStream
SentenceModel(string, IMaxentModel, bool, Dictionary)
public SentenceModel(string languageCode, IMaxentModel sentModel, bool useTokenEnd, Dictionary abbreviations)
Parameters
languageCodestringsentModelIMaxentModeluseTokenEndboolabbreviationsDictionary
SentenceModel(string, IMaxentModel, bool, Dictionary, char[])
TODO: was added in 1.5.3 -> remove
public SentenceModel(string languageCode, IMaxentModel sentModel, bool useTokenEnd, Dictionary abbreviations, char[] eosCharacters)
Parameters
languageCodestringsentModelIMaxentModeluseTokenEndboolabbreviationsDictionaryeosCharacterschar[]
Remarks
Deprecated: Use
SentenceModel
instead and pass in a SentenceDetectorFactory
SentenceModel(string, IMaxentModel, bool, Dictionary, char[]?, IDictionary<string, string>?)
TODO: was added in 1.5.3 -> remove
public SentenceModel(string languageCode, IMaxentModel sentModel, bool useTokenEnd, Dictionary abbreviations, char[]? eosCharacters, IDictionary<string, string>? manifestInfoEntries)
Parameters
languageCodestringsentModelIMaxentModeluseTokenEndboolabbreviationsDictionaryeosCharacterschar[]manifestInfoEntriesIDictionary<string, string>
Remarks
Deprecated: Use
SentenceModel
instead and pass in a SentenceDetectorFactory
SentenceModel(string, IMaxentModel, bool, Dictionary, IDictionary<string, string>)
public SentenceModel(string languageCode, IMaxentModel sentModel, bool useTokenEnd, Dictionary abbreviations, IDictionary<string, string> manifestInfoEntries)
Parameters
languageCodestringsentModelIMaxentModeluseTokenEndboolabbreviationsDictionarymanifestInfoEntriesIDictionary<string, string>
SentenceModel(string, IMaxentModel, IDictionary<string, string>?, SentenceDetectorFactory)
public SentenceModel(string languageCode, IMaxentModel sentModel, IDictionary<string, string>? manifestInfoEntries, SentenceDetectorFactory sdFactory)
Parameters
languageCodestringsentModelIMaxentModelmanifestInfoEntriesIDictionary<string, string>sdFactorySentenceDetectorFactory
Properties
Abbreviations
public virtual Dictionary? Abbreviations { get; }
Property Value
DefaultFactory
Sub-classes should override this method if their module has a default BaseToolFactory sub-class.
protected override Type DefaultFactory { get; }
Property Value
- Type
the default BaseToolFactory for the module, or null if none.
EosCharacters
public virtual char[]? EosCharacters { get; }
Property Value
- char[]
Factory
public virtual SentenceDetectorFactory? Factory { get; }
Property Value
MaxentModel
public virtual IMaxentModel MaxentModel { get; }
Property Value
Methods
UseTokenEnd()
public virtual bool UseTokenEnd()
Returns
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.
protected override void ValidateArtifactMap()