Share via


CjkBigramTokenFilter Class

public final class CjkBigramTokenFilter
extends TokenFilter

Forms bigrams of CJK terms that are generated from the standard tokenizer. This token filter is implemented using Apache Lucene.

Constructor Summary

Constructor Description
CjkBigramTokenFilter(String name)

Creates an instance of CjkBigramTokenFilter class.

Method Summary

Modifier and Type Method and Description
Boolean areOutputUnigrams()

Get the outputUnigrams property: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false).

static CjkBigramTokenFilter fromJson(JsonReader jsonReader)

Reads an instance of CjkBigramTokenFilter from the JsonReader.

List<CjkBigramTokenFilterScripts> getIgnoreScripts()

Get the ignoreScripts property: The scripts to ignore.

String getOdataType()

Get the odataType property: A URI fragment specifying the type of token filter.

CjkBigramTokenFilter setIgnoreScripts(CjkBigramTokenFilterScripts[] ignoreScripts)

Set the ignoreScripts property: The scripts to ignore.

CjkBigramTokenFilter setIgnoreScripts(List<CjkBigramTokenFilterScripts> ignoreScripts)

Set the ignoreScripts property: The scripts to ignore.

CjkBigramTokenFilter setOutputUnigrams(Boolean outputUnigrams)

Set the outputUnigrams property: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false).

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from TokenFilter

Methods inherited from java.lang.Object

Constructor Details

CjkBigramTokenFilter

public CjkBigramTokenFilter(String name)

Creates an instance of CjkBigramTokenFilter class.

Parameters:

name - the name value to set.

Method Details

areOutputUnigrams

public Boolean areOutputUnigrams()

Get the outputUnigrams property: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false.

Returns:

the outputUnigrams value.

fromJson

public static CjkBigramTokenFilter fromJson(JsonReader jsonReader)

Reads an instance of CjkBigramTokenFilter from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CjkBigramTokenFilter if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getIgnoreScripts

public List<CjkBigramTokenFilterScripts> getIgnoreScripts()

Get the ignoreScripts property: The scripts to ignore.

Returns:

the ignoreScripts value.

getOdataType

public String getOdataType()

Get the odataType property: A URI fragment specifying the type of token filter.

Overrides:

CjkBigramTokenFilter.getOdataType()

Returns:

the odataType value.

setIgnoreScripts

public CjkBigramTokenFilter setIgnoreScripts(CjkBigramTokenFilterScripts[] ignoreScripts)

Set the ignoreScripts property: The scripts to ignore.

Parameters:

ignoreScripts - the ignoreScripts value to set.

Returns:

the CjkBigramTokenFilter object itself.

setIgnoreScripts

public CjkBigramTokenFilter setIgnoreScripts(List<CjkBigramTokenFilterScripts> ignoreScripts)

Set the ignoreScripts property: The scripts to ignore.

Parameters:

ignoreScripts - the ignoreScripts value to set.

Returns:

the CjkBigramTokenFilter object itself.

setOutputUnigrams

public CjkBigramTokenFilter setOutputUnigrams(Boolean outputUnigrams)

Set the outputUnigrams property: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false.

Parameters:

outputUnigrams - the outputUnigrams value to set.

Returns:

the CjkBigramTokenFilter object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

CjkBigramTokenFilter.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to