ExternalEntity Class

  • java.lang.Object
    • com.microsoft.bot.ai.luis.ExternalEntity

public class ExternalEntity

Request Body element to use when passing External Entities to the Luis Service call. Defines a user predicted entity that extends an already existing one.

Constructor Summary

Constructor Description
ExternalEntity()

Initializes a new instance of ExternalEntity.

ExternalEntity(String entity, int start, int length, JsonNode resolution)

Initializes a new instance of ExternalEntity.

Method Summary

Modifier and Type Method and Description
java.lang.String getEntity()

Gets the name of the entity to extend.

int getLength()

Gets the length of the predicted entity.

com.fasterxml.jackson.databind.JsonNode getResolution()

Gets a user supplied custom resolution to return as the entity's prediction.

int getStart()

Gets the start character index of the predicted entity.

void setEntity(String entity)

Sets the name of the entity to extend.

void setLength(int length)

Sets the length of the predicted entity.

void setResolution(JsonNode resolution)

Sets a user supplied custom resolution to return as the entity's prediction.

void setStart(int start)

Sets the start character index of the predicted entity.

void validate()

Validate the object.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

ExternalEntity

public ExternalEntity()

Initializes a new instance of ExternalEntity.

ExternalEntity

public ExternalEntity(String entity, int start, int length, JsonNode resolution)

Initializes a new instance of ExternalEntity.

Parameters:

entity - name of the entity to extend.
start - start character index of the predicted entity.
length - length of the predicted entity.
resolution - supplied custom resolution to return as the entity's prediction.

Method Details

getEntity

public String getEntity()

Gets the name of the entity to extend.

Returns:

The name of the entity to extend.

getLength

public int getLength()

Gets the length of the predicted entity.

Returns:

The length of the predicted entity.

getResolution

public JsonNode getResolution()

Gets a user supplied custom resolution to return as the entity's prediction.

Returns:

A user supplied custom resolution to return as the entity's prediction.

getStart

public int getStart()

Gets the start character index of the predicted entity.

Returns:

The start character index of the predicted entity.

setEntity

public void setEntity(String entity)

Sets the name of the entity to extend.

Parameters:

entity - The name of the entity to extend.

setLength

public void setLength(int length)

Sets the length of the predicted entity.

Parameters:

length - The length of the predicted entity.

setResolution

public void setResolution(JsonNode resolution)

Sets a user supplied custom resolution to return as the entity's prediction.

Parameters:

resolution - A user supplied custom resolution to return as the entity's prediction.

setStart

public void setStart(int start)

Sets the start character index of the predicted entity.

Parameters:

start - The start character index of the predicted entity.

validate

public void validate()

Validate the object.

Throws:

java.lang.IllegalArgumentException - on null or invalid values

Applies to