Interface | Description |
---|---|
NCIntentSolver.COMBINATOR |
Marker type for built-in combinators.
|
NCIntentSolverContext |
A context that can be passed passed into the callback of the matched intent.
|
Class | Description |
---|---|
NCIntentSolver |
Main entry point for intent-based user input matcher.
|
NCIntentSolver.AND |
AND-combinator.
|
NCIntentSolver.CONV_INTENT |
Convenient adapter for conversational unordered intent.
|
NCIntentSolver.INTENT |
An intent is a collection of terms defining a formal template for user input.
|
NCIntentSolver.NAND |
NAND-combinator.
|
NCIntentSolver.NON_CONV_INTENT |
Convenient adapter for non-conversational unordered intent.
|
NCIntentSolver.NOR |
NOR-combinator.
|
NCIntentSolver.NOT |
NOT-combinator.
|
NCIntentSolver.OR |
OR-combinator.
|
NCIntentSolver.RULE |
Declarative predicate over
NCToken . |
NCIntentSolver.TERM |
Term is a building block of the intent.
|
NCIntentSolver.XNOR |
XNOR (exclusive NOR)-combinator.
|
NCIntentSolver.XOR |
XOR (exclusive OR)-combinator.
|
Exception | Description |
---|---|
NCIntentSkip |
Control flow exception to skip current intent.
|
Annotation Type | Description |
---|---|
NCIntent |
Annotation to define an intent on the method serving as its callback.
|
NCIntentRef |
Annotations referencing an intent defined externally.
|
NCIntentTerm |
Annotation to mark callback parameter to receive term's tokens.
|
Intent-based input matcher (or solver) is intended for simpler and more declarative implementation of model's query(NCQueryContext)
method. This is the main method in the data model and it is responsible for converting parsed user input into an action.
It cannot be defined in the external JSON or YAML model definition and, therefore, has to be defined in the code.
Although this method can be implemented manually by encoding the logic of parsing query context and its list of
parsing variants - it is often more complex and error-prone than necessary.
Intent solver is based on an idea of adding one or more user input templates, also
known as intents
, and letting the solver select the best
matching intent for a given the user input. Each intent defines a pattern of the user input and associated action
to take when that pattern is selected. While selecting the best matching intent the solver uses sophisticated NLP
analysis and conversation context for anaphoras resolution. Among multiple detected intents the solver will always
select the most specific one.
Copyright © 2013-2019 NLPCraft Project. All rights reserved.