public interface NCCustomParser
NCModel.getParser()
method.
By default the semantic data model detects its elements by their synonyms declared in the model. However, in some cases the synonyms (or the regular expressions) are simply not expressive enough. In such cases, a user-defined custom parser can be defined for the model that would allow the user to define its own logic to detect the model elements in the user input programmatically. Note that there can be only one custom parser per model and it can detect any number of model elements.
NCModel.getParser()
Modifier and Type | Method and Description |
---|---|
List<NCCustomElement> |
parse(List<NCCustomWord> sen)
Analyses user input provided as a list of
NCCustomWord objects and returns a list
of NCCustomElement objects. |
List<NCCustomElement> parse(List<NCCustomWord> sen)
NCCustomWord
objects and returns a list
of NCCustomElement
objects.sen
- Entire user input represented as a list of custom tokens.null
if no model elements detected.NCModel.getParser()
Copyright © 2013-2019 NLPCraft Project. All rights reserved.