Package org.apache.nlpcraft.model
Interface NCContext
-
- All Superinterfaces:
NCMetadata
,Serializable
public interface NCContext extends NCMetadata, 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NCConversation
getConversation()
Gets current conversation for the query's user and data model.NCModelView
getModel()
Gets model instance for this query.NCRequest
getRequest()
Gets supplemental information about user request.Collection<? extends NCVariant>
getVariants()
Gets collection of all parsing variants for this query.boolean
isOwnerOf(NCToken tok)
Tests if given token is part of the query this context is associated with.-
Methods inherited from interface org.apache.nlpcraft.model.NCMetadata
getMetadata, meta, meta, metaOpt, metax
-
-
-
-
Method Detail
-
isOwnerOf
boolean isOwnerOf(NCToken tok)
Tests if given token is part of the query this context is associated with.- Parameters:
tok
- Token to check.- Returns:
true
if given token is from the sentence associated with this context,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.
-
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.
-
-