Interface NCContext

  • All Superinterfaces:

    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:
    • Method Detail

      • isOwnerOf

        boolean isOwnerOf​(NCToken tok)
        Tests if given token is part of this query.
        tok - Token to check.
        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.
        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.
        Server request ID.
      • getModel

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

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

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