Class LanguageDetectorFactory

Namespace
NOpenNLP.Tools.Langdetect
Assembly
NOpenNLP.Tools.dll

Default factory used by Language Detector. Extend this class to change the Language Detector behaviour, such as the ILanguageDetectorContextGenerator. The default DefaultLanguageDetectorContextGenerator will use char n-grams of size 1 to 3 and the following normalizers:

public class LanguageDetectorFactory : BaseToolFactory
Inheritance
LanguageDetectorFactory
Inherited Members

Methods

Create(string?)

public static LanguageDetectorFactory Create(string? subclassName)

Parameters

subclassName string

Returns

LanguageDetectorFactory

GetContextGenerator()

public virtual ILanguageDetectorContextGenerator GetContextGenerator()

Returns

ILanguageDetectorContextGenerator

Init()

public virtual void Init()

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