Table of Contents

Property MaxNgramSize

Namespace
LMKit.TextAnalysis
Assembly
LM-Kit.NET.dll

MaxNgramSize

Gets or sets the maximum allowed n-gram size for extracted keywords. This value serves as a guidance for the extraction process but does not guarantee that the exact size or number of n-grams will be produced. The output depends on the model's capacities and the characteristics of the input data. The value is clamped between 1 and 20.

public int MaxNgramSize { get; set; }

Property Value

int

The default value is 3.

Examples

extractor.MaxNgramSize = 2; // Extract unigrams and bigrams only
Console.WriteLine("Max Ngram Size: " + extractor.MaxNgramSize);