Class ChunkerModel

Namespace
NOpenNLP.Tools.Chunker
Assembly
NOpenNLP.Tools.dll

The ChunkerModel is the model used by a learnable IChunker.

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

Constructors

ChunkerModel(FileInfo)

public ChunkerModel(FileInfo modelFile)

Parameters

modelFile FileInfo

ChunkerModel(Stream)

public ChunkerModel(Stream @in)

Parameters

in Stream

ChunkerModel(string)

public ChunkerModel(string modelPath)

Parameters

modelPath string

ChunkerModel(string, IMaxentModel, ChunkerFactory)

public ChunkerModel(string languageCode, IMaxentModel chunkerModel, ChunkerFactory factory)

Parameters

languageCode string
chunkerModel IMaxentModel
factory ChunkerFactory

ChunkerModel(string, IMaxentModel, Dictionary<string, string>, ChunkerFactory)

public ChunkerModel(string languageCode, IMaxentModel chunkerModel, Dictionary<string, string> manifestInfoEntries, ChunkerFactory factory)

Parameters

languageCode string
chunkerModel IMaxentModel
manifestInfoEntries Dictionary<string, string>
factory ChunkerFactory

ChunkerModel(string, IMaxentModel, int, Dictionary<string, string>, ChunkerFactory)

public ChunkerModel(string languageCode, IMaxentModel chunkerModel, int beamSize, Dictionary<string, string> manifestInfoEntries, ChunkerFactory factory)

Parameters

languageCode string
chunkerModel IMaxentModel
beamSize int
manifestInfoEntries Dictionary<string, string>
factory ChunkerFactory

ChunkerModel(string, ISequenceClassificationModel<string>, Dictionary<string, string>, ChunkerFactory)

public ChunkerModel(string languageCode, ISequenceClassificationModel<string> chunkerModel, Dictionary<string, string> manifestInfoEntries, ChunkerFactory factory)

Parameters

languageCode string
chunkerModel ISequenceClassificationModel<string>
manifestInfoEntries Dictionary<string, string>
factory ChunkerFactory

Properties

ChunkerModelValue

[Obsolete("Use ChunkerSequenceModel instead. This property will be removed soon.")]
public virtual IMaxentModel? ChunkerModelValue { get; }

Property Value

IMaxentModel

Remarks

NOpenNLP: This was getChunkerModel() in Java.

ChunkerSequenceModel

public virtual ISequenceClassificationModel<TokenTag>? ChunkerSequenceModel { get; }

Property Value

ISequenceClassificationModel<TokenTag>

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.

Factory

public virtual ChunkerFactory Factory { get; }

Property Value

ChunkerFactory

Methods

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