Interface NCContext

  • All Superinterfaces:
    Serializable

    public interface NCContext
    extends Serializable
    Data model query context. This context defines fully processed user input and its associated data that the model's intents need to process and return the result.
    See Also:
    NCIntentMatch.getContext()
    • Method Detail

      • isOwnerOf

        boolean isOwnerOf​(NCToken tok)
        Tests if given token is part of this query.
        Parameters:
        tok - Token to check.
        Returns:
        true if given token is from this sentence, false otherwise.
      • getVariants

        Collection<? extends NCVariant> getVariants()
        Gets collection of all parsing variants for this query. Each parsing variant is a list of detected tokens. Note that a given user input can have one or more possible different parsing variants.
        Returns:
        All parsing variants of this query. Always contains at least one variant.
      • getServerRequestId

        String getServerRequestId()
        Gets globally unique ID of the current request. Server request is defined as a processing of a one user input sentence. Note that the model can be accessed (i.e. intents can be matched) multiple times during the processing of a single request, and therefore multiple contexts may return the same server request ID.
        Returns:
        Server request ID.
      • getModel

        NCModelView getModel()
        Gets model instance for this query.
        Returns:
        Model.
      • getRequest

        NCRequest getRequest()
        Gets supplemental information about user request.
        Returns:
        Supplemental information about user request.
      • getConversation

        NCConversation getConversation()
        Gets current conversation for the query's user and data model.
        Returns:
        Current conversation.