Share via


SplitSkill Class

public final class SplitSkill
extends SearchIndexerSkill

A skill to split a string into chunks of text.

Constructor Summary

Constructor Description
SplitSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs)

Creates an instance of SplitSkill class.

Method Summary

Modifier and Type Method and Description
static SplitSkill fromJson(JsonReader jsonReader)

Reads an instance of SplitSkill from the JsonReader.

SplitSkillLanguage getDefaultLanguageCode()

Get the defaultLanguageCode property: A value indicating which language code to use.

Integer getMaximumPageLength()

Get the maximumPageLength property: The desired maximum page length.

Integer getMaximumPagesToTake()

Get the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'.

String getOdataType()

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

Integer getPageOverlapLength()

Get the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'.

TextSplitMode getTextSplitMode()

Get the textSplitMode property: A value indicating which split mode to perform.

SplitSkill setContext(String context)

Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content).

SplitSkill setDefaultLanguageCode(SplitSkillLanguage defaultLanguageCode)

Set the defaultLanguageCode property: A value indicating which language code to use.

SplitSkill setDescription(String description)

Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.

SplitSkill setMaximumPageLength(Integer maximumPageLength)

Set the maximumPageLength property: The desired maximum page length.

SplitSkill setMaximumPagesToTake(Integer maximumPagesToTake)

Set the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'.

SplitSkill setName(String name)

Set the name property: The name of the skill which uniquely identifies it within the skillset.

SplitSkill setPageOverlapLength(Integer pageOverlapLength)

Set the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'.

SplitSkill setTextSplitMode(TextSplitMode textSplitMode)

Set the textSplitMode property: A value indicating which split mode to perform.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from SearchIndexerSkill

Methods inherited from java.lang.Object

Constructor Details

SplitSkill

public SplitSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs)

Creates an instance of SplitSkill class.

Parameters:

inputs - the inputs value to set.
outputs - the outputs value to set.

Method Details

fromJson

public static SplitSkill fromJson(JsonReader jsonReader)

Reads an instance of SplitSkill from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SplitSkill 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.

getDefaultLanguageCode

public SplitSkillLanguage getDefaultLanguageCode()

Get the defaultLanguageCode property: A value indicating which language code to use. Default is `en`.

Returns:

the defaultLanguageCode value.

getMaximumPageLength

public Integer getMaximumPageLength()

Get the maximumPageLength property: The desired maximum page length. Default is 10000.

Returns:

the maximumPageLength value.

getMaximumPagesToTake

public Integer getMaximumPagesToTake()

Get the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'. If specified, the SplitSkill will discontinue splitting after processing the first 'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are needed from each document.

Returns:

the maximumPagesToTake value.

getOdataType

public String getOdataType()

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

Overrides:

SplitSkill.getOdataType()

Returns:

the odataType value.

getPageOverlapLength

public Integer getPageOverlapLength()

Get the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'. If specified, n+1th chunk will start with this number of characters/tokens from the end of the nth chunk.

Returns:

the pageOverlapLength value.

getTextSplitMode

public TextSplitMode getTextSplitMode()

Get the textSplitMode property: A value indicating which split mode to perform.

Returns:

the textSplitMode value.

setContext

public SplitSkill setContext(String context)

Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

Overrides:

SplitSkill.setContext(String context)

Parameters:

context

setDefaultLanguageCode

public SplitSkill setDefaultLanguageCode(SplitSkillLanguage defaultLanguageCode)

Set the defaultLanguageCode property: A value indicating which language code to use. Default is `en`.

Parameters:

defaultLanguageCode - the defaultLanguageCode value to set.

Returns:

the SplitSkill object itself.

setDescription

public SplitSkill setDescription(String description)

Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.

Overrides:

SplitSkill.setDescription(String description)

Parameters:

description

setMaximumPageLength

public SplitSkill setMaximumPageLength(Integer maximumPageLength)

Set the maximumPageLength property: The desired maximum page length. Default is 10000.

Parameters:

maximumPageLength - the maximumPageLength value to set.

Returns:

the SplitSkill object itself.

setMaximumPagesToTake

public SplitSkill setMaximumPagesToTake(Integer maximumPagesToTake)

Set the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'. If specified, the SplitSkill will discontinue splitting after processing the first 'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are needed from each document.

Parameters:

maximumPagesToTake - the maximumPagesToTake value to set.

Returns:

the SplitSkill object itself.

setName

public SplitSkill setName(String name)

Set the name property: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'.

Overrides:

SplitSkill.setName(String name)

Parameters:

name

setPageOverlapLength

public SplitSkill setPageOverlapLength(Integer pageOverlapLength)

Set the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'. If specified, n+1th chunk will start with this number of characters/tokens from the end of the nth chunk.

Parameters:

pageOverlapLength - the pageOverlapLength value to set.

Returns:

the SplitSkill object itself.

setTextSplitMode

public SplitSkill setTextSplitMode(TextSplitMode textSplitMode)

Set the textSplitMode property: A value indicating which split mode to perform.

Parameters:

textSplitMode - the textSplitMode value to set.

Returns:

the SplitSkill object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

SplitSkill.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to