@@ -5,10 +5,8 @@ from core.Models import Singleton
class Brain:
# TODO review the Singleton, should be Instantiate at the BrainLoader level
"""
-
- This Class is a Singleton Representing the Brain.yml file with synapse
- .. note:: the is_loaded Boolean is True when the Brain has been properly loaded.
+ This Class is a Singleton Representing the Brain.yml file with synapse
+ .. note:: the is_loaded Boolean is True when the Brain has been properly loaded.
def __init__(self, synapses=None, brain_file=None, brain_yaml=None):
@@ -1,12 +1,10 @@
class Event(object):
+ This Class is representing an Event which is raised by when the System at some defined time.
- This Class is representing an Event which is raised by when the System at some defined time.
- .. note:: Events are based on the system crontab
+ .. note:: Events are based on the system crontab
def __init__(self, period):
self.period = period
@@ -16,10 +14,9 @@ class Event(object):
def serialize(self):
This method allows to serialize in a proper way this object
- :return: A dict of name / perio
+ :return: A dict of name / period
:rtype: Dict
@@ -1,19 +1,16 @@
class Neuron(object):
+ This Class is representing a Neuron which is corresponding to an action to perform.
- This Class is representing a Neuron which is corresponding to an action to perform.
- .. note:: Neurons are defined in the brain file
+ .. note:: Neurons are defined in the brain file
def __init__(self, name=None, parameters=None):
self.name = name
self.parameters = parameters
:return: A dict of name and parameters
class Order(object):
+ This Class is representing an Order which is raised by when an entry (Vocal/REST/ anything ...) is matching it.
- This Class is representing an Order which is raised by when an entry (Vocal/REST/ anything ...) is matching it.
- .. note:: Order are defined in the brain file for each synapse.
+ .. note:: Order are defined in the brain file for each synapse.
def __init__(self, sentence):
self.sentence = sentence
@@ -15,7 +13,6 @@ class Order(object):
:return: A dict of order
@@ -1,11 +1,8 @@
class RestAPI(object):
- This Class is representing the rest API with all its configuration.
+ This Class is representing the rest API with all its configuration.
def __init__(self, password_protected=None, login=None, password=None, active=None, port=None):
@@ -5,10 +5,9 @@ from core.Models import Singleton
class Settings(object):
+ This Class is a Singleton Representing the settings.yml file with synapse
- This Class is a Singleton Representing the settings.yml file with synapse
- .. note:: the is_loaded Boolean is True when the Settings has been properly loaded.
+ .. note:: the is_loaded Boolean is True when the Settings has been properly loaded.
def __init__(self,
default_tts_name=None,
@@ -1,10 +1,8 @@
class Stt(object):
+ This Class is representing a Speech To Text (STT) element with name and parameters
- This Class is representing a Speech To Text (STT) element with name and parameters
- .. note:: must be defined in the settings.yml
+ .. note:: must be defined in the settings.yml
class Synapse(object):
+ This Class is representing a Synapse with its name, and a dict of Neurons and a dict of signals
- This Class is representing a Synapse with its name, and a dict of Neurons and a dict of signals
- .. note:: must be defined in the brain.yml
+ .. note:: must be defined in the brain.yml
def __init__(self, name=None, neurons=None, signals=None):
self.neurons = neurons
@@ -14,7 +12,6 @@ class Synapse(object):
:return: A dict of name, neurons, signals
@@ -1,17 +1,13 @@
class Trigger(object):
+ This Class is representing a Trigger with its name and parameters
- This Class is representing a Trigger with its name and parameters
def __str__(self):
return "Trigger name: %s, parameters: %s" % (str(self.name), str(self.parameters))
class Tts(object):
+ This Class is representing a Text To Speech (TTS) with its name and parameters
- This Class is representing a Text To Speech (TTS) with its name and parameters