Share via


NGramTokenizer Class

Definition

Tokenizes the input into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene.

public class NGramTokenizer : Azure.Search.Documents.Indexes.Models.LexicalTokenizer
public class NGramTokenizer : Azure.Search.Documents.Indexes.Models.LexicalTokenizer, System.ClientModel.Primitives.IJsonModel<Azure.Search.Documents.Indexes.Models.NGramTokenizer>, System.ClientModel.Primitives.IPersistableModel<Azure.Search.Documents.Indexes.Models.NGramTokenizer>
type NGramTokenizer = class
    inherit LexicalTokenizer
type NGramTokenizer = class
    inherit LexicalTokenizer
    interface IJsonModel<NGramTokenizer>
    interface IPersistableModel<NGramTokenizer>
Public Class NGramTokenizer
Inherits LexicalTokenizer
Public Class NGramTokenizer
Inherits LexicalTokenizer
Implements IJsonModel(Of NGramTokenizer), IPersistableModel(Of NGramTokenizer)
Inheritance
NGramTokenizer
Implements

Constructors

NGramTokenizer(String)

Initializes a new instance of NGramTokenizer.

Properties

MaxGram

The maximum n-gram length. Default is 2. Maximum is 300.

MinGram

The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram.

Name

The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

(Inherited from LexicalTokenizer)
TokenChars

Character classes to keep in the tokens.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<LexicalTokenizer>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from LexicalTokenizer)
IJsonModel<LexicalTokenizer>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from LexicalTokenizer)
IJsonModel<NGramTokenizer>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<NGramTokenizer>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<LexicalTokenizer>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from LexicalTokenizer)
IPersistableModel<LexicalTokenizer>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from LexicalTokenizer)
IPersistableModel<LexicalTokenizer>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from LexicalTokenizer)
IPersistableModel<NGramTokenizer>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<NGramTokenizer>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<NGramTokenizer>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to