Interface NCTestResult


  • public interface NCTestResult
    Result of the test sentence processing.
    • Method Detail

      • getText

        String getText()
        Gets test sentence text.
        Returns:
        Test sentence text.
      • getProcessingTime

        long getProcessingTime()
        Gets total sentence processing time in milliseconds.
        Returns:
        Processing time in milliseconds.
      • getModelId

        String getModelId()
        Gets model ID the test sentence was sent with.
        Returns:
        Model ID.
      • getResult

        Optional<String> getResult()
        Gets optional execution result. Only provided if processing succeeded.
        Returns:
        Optional execution result.
        See Also:
        isFailed(), isOk()
      • getResultType

        Optional<String> getResultType()
        Gets optional execution result type. Only provided if processing succeeded.
        Returns:
        Optional execution result type.
        See Also:
        isFailed(), isOk()
      • getResultError

        Optional<String> getResultError()
        Gets optional execution error. Only provided if processing failed.
        Returns:
        Optional execution error.
        See Also:
        isFailed(), isOk()
      • isFailed

        default boolean isFailed()
        Tests whether or not this result corresponds to a failed execution. This is identical to:
              return getResultError().isPresent();
         
        Returns:
        true if result corresponds to a failed execution, false otherwise.
      • isOk

        default boolean isOk()
        Tests whether or not this result corresponds to a successful execution. This is identical to:
              return getResult().isPresent() && getResultType().isPresent();
         
        Returns:
        true if result corresponds to a successful execution, false otherwise.
      • getIntentId

        String getIntentId()
        Gets ID of the intent that was matched against the input sentence. Only set if isOk() method returns true.
        Returns:
        ID of the matching intent.