Package com.vivoka.vsdk.nlu
Class Engine
java.lang.Object
com.vivoka.vsdk.nlu.Engine
- All Implemented Interfaces:
IEngine
Abstract class representing the NLU engine.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetParser(String name, IParserListener listener) Gets or creates a parser with the specified name and listener.protected abstract ParsermakeParser(String name, IParserListener listener) voidremoveParser(String name) Removes the parser with the specified name by releasing the parser resources.
-
Field Details
-
_parsers
-
-
Constructor Details
-
Engine
public Engine()
-
-
Method Details
-
getParser
Gets or creates a parser with the specified name and listener.- Parameters:
name- The name of the parser.listener- The listener to handle events. If the parser already exists, the listener will be overridden by the new one.- Returns:
- The parser instance.
- Throws:
Exception- If the parser cannot be created or found.
-
removeParser
Removes the parser with the specified name by releasing the parser resources.- Parameters:
name- The name of the parser to remove.- Throws:
Exception- If the parser cannot be removed.
-
makeParser
- Throws:
Exception
-