- All Superinterfaces:
public interface NCCustomParser extends NCLifecycleCustom model element parser for programmatic NER implementations. This parser allows to define your own Named Entity Recognizer (NER) implementation in cases when the standard declarative methods are not expressive enough. Instance of the parser should be made available in the model via
By default the semantic data model detects its elements by their declarative synonyms. However, in some cases this is not expressive enough. In such cases, one or more user-defined parsers can be defined for the model that would allow the user to define its own NER logic to detect the model elements in the user input programmatically. Note that there can be multiple custom parsers per model and each one can detect any number of model elements.
- See Also:
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
parse(NCRequest req, NCModelView mdl, List<NCCustomWord> words, List<NCCustomElement> elements)
List<NCCustomElement> parse(NCRequest req, NCModelView mdl, List<NCCustomWord> words, List<NCCustomElement> elements)Analyses user input provided as a list of
NCCustomWordobjects and returns a list of
NCCustomElementobjects. Note that model elements returned from this method must be defined in the model, i.e. this method only provides an additional logic of detecting these elements but they still need to be defined normally in the model.
req- User request descriptor.
mdl- Instance of data model this parser belongs to.
words- Entire user input represented as a list of custom words.
elements- List of already parsed and detected model elements at the point of this call.
- List of custom elements. List can be empty or
nullif no model elements detected.
- See Also: