Engine¶
-
class
raven.engine.abstract_engine.AbstractEngine(*args, **kwarg)[source]
-
class
raven.engine.abstract_engine.BaseEngine(input_object, output_object, engine_param=None)[source] Base engine will be mother of all its sub-class. As major lifting is taken in inside the BaseEngine. Just use the sub-class to handline the case which Mother’s class can’t be handling.
-
go()[source] Running the go function which will be used to run. Return is layer, will handling the input sentence.
..notes
sub class must return `self.return_object` itself. Returning to ` OutPut` module must decised by ` Engine`.
-
next()[source] @depreacted :meth::BasedEngine.next are recommenced to be called after the end of engine.
-
subscribe_tobreak(sender)[source] Get the event signal and return true(for now).
-
-
class
raven.engine.default_engine.DefaultEngine(input_object, output_object, engine_param=None)[source] Default Engine module will be used for managing the NLU engine.
-
add(layer)[source] Add the layer function into the engine’s list for executing of the layer function.
Param: raven.layer.abstract_layerlayer the objectof function are added as layer into the engine for concurrency exection.
-
command_success_response(txObject)[source] Find if there the given user’s text is related to command request. if then change the scope intent name as
commandsIntent_command.
-
go(pretty='base.html')[source] Param: pretty is the name of the file where the meta data or base line of html are saved and it is parsed along with return result. Currently base.html and json.html is taken as parameter.
-
parse(request_text)[source] Parser the given user’s text using the the Snip NLU engine.
-
response(scope)[source] Get the
Dictstatus from NLU or command execution successfully, the one response classraven.responseimported.
-
train_model(path)[source] Train the NLU JSON format by SNIP NLU.
Parameters: path (str) – path of the dataset.json
-