Class LemmatizerModel

Namespace
NOpenNLP.Tools.Lemmatizer
Assembly
NOpenNLP.Tools.dll

The LemmatizerModel is the model used by a learnable ILemmatizer.

public class LemmatizerModel : BaseModel, IArtifactProvider
Inheritance
LemmatizerModel
Implements
Inherited Members

Constructors

LemmatizerModel(FileInfo)

public LemmatizerModel(FileInfo modelFile)

Parameters

modelFile FileInfo

LemmatizerModel(Stream)

public LemmatizerModel(Stream @in)

Parameters

in Stream

LemmatizerModel(string)

public LemmatizerModel(string modelPath)

Parameters

modelPath string

LemmatizerModel(string, IMaxentModel, LemmatizerFactory)

public LemmatizerModel(string languageCode, IMaxentModel lemmatizerModel, LemmatizerFactory factory)

Parameters

languageCode string
lemmatizerModel IMaxentModel
factory LemmatizerFactory

LemmatizerModel(string, IMaxentModel, IDictionary<string, string>, LemmatizerFactory)

public LemmatizerModel(string languageCode, IMaxentModel lemmatizerModel, IDictionary<string, string> manifestInfoEntries, LemmatizerFactory factory)

Parameters

languageCode string
lemmatizerModel IMaxentModel
manifestInfoEntries IDictionary<string, string>
factory LemmatizerFactory

LemmatizerModel(string, IMaxentModel, int, IDictionary<string, string>, LemmatizerFactory)

public LemmatizerModel(string languageCode, IMaxentModel lemmatizerModel, int beamSize, IDictionary<string, string> manifestInfoEntries, LemmatizerFactory factory)

Parameters

languageCode string
lemmatizerModel IMaxentModel
beamSize int
manifestInfoEntries IDictionary<string, string>
factory LemmatizerFactory

LemmatizerModel(string, ISequenceClassificationModel<string>, IDictionary<string, string>, LemmatizerFactory)

public LemmatizerModel(string languageCode, ISequenceClassificationModel<string> lemmatizerModel, IDictionary<string, string> manifestInfoEntries, LemmatizerFactory factory)

Parameters

languageCode string
lemmatizerModel ISequenceClassificationModel<string>
manifestInfoEntries IDictionary<string, string>
factory LemmatizerFactory

Properties

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.

LemmatizerSequenceModel

public virtual ISequenceClassificationModel<string>? LemmatizerSequenceModel { get; }

Property Value

ISequenceClassificationModel<string>

Methods

GetFactory()

public virtual LemmatizerFactory GetFactory()

Returns

LemmatizerFactory

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()

Exceptions

InvalidFormatException

See Also