Class ResultPassageAnswer

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.discovery.v2.model.ResultPassageAnswer
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class ResultPassageAnswer
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Object containing a potential answer to the specified query.
  • Constructor Details

    • ResultPassageAnswer

      public ResultPassageAnswer()
  • Method Details

    • getAnswerText

      public String getAnswerText()
      Gets the answerText.

      Answer text for the specified query as identified by Discovery.

      Returns:
      the answerText
    • getStartOffset

      public Long getStartOffset()
      Gets the startOffset.

      The position of the first character of the extracted answer in the originating field.

      Returns:
      the startOffset
    • getEndOffset

      public Long getEndOffset()
      Gets the endOffset.

      The position of the last character of the extracted answer in the originating field.

      Returns:
      the endOffset
    • getConfidence

      public Double getConfidence()
      Gets the confidence.

      An estimate of the probability that the answer is relevant.

      Returns:
      the confidence