Esempio n. 1
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="spelling")
     self._classname = None
     self._corpus = None
     self._alphabet = None
     self._check_before = False
     self._check_and_retry = False
Esempio n. 2
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="conversations")
     self._max_histories = 100
     self._restore_last_topic = False
     self._initial_topic = "*"
     self._type = None
     self._storage = None
     self._empty_on_start = False
Esempio n. 3
0
 def __init__(self):
     self.bot_root               = BotConfiguration.DEFAULT_ROOT
     self._prompt                = BotConfiguration.DEFAULT_PROMPT
     self._default_response      = BotConfiguration.DEFAULT_RESPONSE
     self._exit_response         = BotConfiguration.DEFAULT_EXIT_RESPONSE
     self._initial_question      = BotConfiguration.DEFAULT_INITIAL_QUESTION
     self._override_predicates   = BotConfiguration.DEFAULT_OVERRIDE_PREDICATES
     BaseConfigurationData.__init__(self, "bot")
Esempio n. 4
0
    def __init__(self):
        BaseConfigurationData.__init__(self, name="scheduler")
        self._name = None
        self._debug_level = 0
        self._add_listeners = False
        self._remove_all_jobs = False
        self._blocking = False

        self._jobstore = None
        self._threadpool = None
        self._processpool = None
        self._job_defaults = None
Esempio n. 5
0
    def test_sub_bot_root(self):
        config = BaseConfigurationData("test")

        replaced = config.sub_bot_root( os.sep + "data",  os.sep + "root")
        self.assertIsNotNone(replaced)
        self.assertEqual(replaced,  os.sep + "data")

        replaced = config.sub_bot_root("$BOT_ROOT"+ os.sep + "data",  os.sep + "root")
        self.assertIsNotNone(replaced)
        self.assertEqual(replaced,  os.sep + "root" + os.sep + "data")

        replaced = config.sub_bot_root("$BOT_ROOT$BOT_ROOT"+ os.sep + "data",  os.sep + "root")
        self.assertIsNotNone(replaced)
        self.assertEqual(replaced,  os.sep + "root" + os.sep + "root" + os.sep + "data")
Esempio n. 6
0
    def test_additionals(self):
        config = BaseConfigurationData("test")

        self.assertEqual([], config.additionals_to_add())

        config._additionals["key1"] = "value1"
        config._additionals["key2"] = "value2"

        self.assertTrue(config.exists("key1"))
        self.assertEqual("value1", config.value("key1"))

        self.assertTrue(config.exists("key2"))
        self.assertEqual("value2", config.value("key2"))

        self.assertFalse(config.exists("key3"))
Esempio n. 7
0
 def __init__(self):
     self._supress_warnings  = BrainConfiguration.DEFAULT_SUPRESS_WARNINGS
     self._allow_system_aiml = BrainConfiguration.DEFAULT_ALLOW_SYSTEM_AIML
     self._allow_learn_aiml  = BrainConfiguration.DEFAULT_ALLOW_LEARN_AIML
     self._allow_learnf_aiml = BrainConfiguration.DEFAULT_ALLOW_LEARNF_AIML
     self._aiml_files        = None
     self._set_files         = None
     self._map_files         = None
     self._denormal          = None
     self._normal            = None
     self._gender            = None
     self._person            = None
     self._person2           = None
     self._predicates        = None
     self._pronouns          = None
     self._properties        = None
     self._triples           = None
     self._preprocessors     = None
     self._postprocessors    = None
     self._services = []
     BaseConfigurationData.__init__(self, "brain")
Esempio n. 8
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "nodes")
     self._pattern_nodes = None
     self._template_nodes = None
Esempio n. 9
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="processpool")
     self._max_workers = None
Esempio n. 10
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="tokenizer")
     self._classname = None
     self._split_chars = " "
Esempio n. 11
0
 def __init__(self, name):
     BaseConfigurationData.__init__(self, name)
Esempio n. 12
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "dynamic")
     self._dynamic_sets = {}
     self._dynamic_maps = {}
     self._dynamic_vars = {}
Esempio n. 13
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._host = "localhost"
     self._port = 6379
     self._password = None
     self._prefix = None
Esempio n. 14
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="job_defaults")
     self._coalesce = None
     self._max_instances = None
Esempio n. 15
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="splitter")
     self._classname = BotSentenceSplitterConfiguration.DEFAULT_CLASSNAME
     self._split_chars = BotSentenceSplitterConfiguration.DEFAULT_SPLITCHARS
Esempio n. 16
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="spelling")
     self._classname = None
     self._alphabet = None
     self._check_before = False
     self._check_and_retry = False
Esempio n. 17
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="mongo")
     self._collection = None
Esempio n. 18
0
    def __init__(self, name="file"):
        BaseConfigurationData.__init__(self, name=name)

        tmpdir = FileStorageConfiguration.get_temp_dir()

        self._categories_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "categories"],
            extension="aiml",
            subdirs=True,
            format="xml",
            encoding="utf-8",
            delete_on_start=False)
        self._errors_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                      "debug/errors.txt",
                                                      format="text",
                                                      encoding="utf-8",
                                                      delete_on_start=False)
        self._duplicates_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "debug/duplicates.txt",
            format="text",
            encoding="utf-8",
            delete_on_start=False)
        self._learnf_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "categories/learnf"],
            extension="aiml",
            subdirs=False,
            format="xml",
            encoding="utf-8",
            delete_on_start=False)

        self._conversation_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "conversations"],
            extension="txt",
            subdirs=False,
            format="text",
            encoding="utf-8",
            delete_on_start=False)

        self._sets_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "sets"],
            extension="txt",
            subdirs=False,
            format="text",
            encoding="utf-8",
            delete_on_start=False)
        self._maps_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "maps"],
            extension="txt",
            subdirs=False,
            format="text",
            encoding="utf-8",
            delete_on_start=False)
        self._rdf_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "rdfs"],
            extension="txt",
            subdirs=True,
            format="text",
            encoding="utf-8",
            delete_on_start=False)

        self._denormal_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                        "lookups/denormal.txt",
                                                        format="text",
                                                        encoding="utf-8",
                                                        delete_on_start=False)
        self._normal_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                      "lookups/normal.txt",
                                                      format="text",
                                                      encoding="utf-8",
                                                      delete_on_start=False)
        self._gender_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                      "lookups/gender.txt",
                                                      format="text",
                                                      encoding="utf-8",
                                                      delete_on_start=False)
        self._person_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                      "lookups/person.txt",
                                                      format="text",
                                                      encoding="utf-8",
                                                      delete_on_start=False)
        self._person2_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                       "lookups/person2.txt",
                                                       format="text",
                                                       encoding="utf-8",
                                                       delete_on_start=False)
        self._regex_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                     "lookups/regex.txt",
                                                     format="text",
                                                     encoding="utf-8",
                                                     delete_on_start=False)

        self._properties_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "properties.txt",
            format="text",
            encoding="utf-8",
            delete_on_start=False)
        self._defaults_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                        "defaults.txt",
                                                        format="text",
                                                        encoding="utf-8",
                                                        delete_on_start=False)
        self._variables_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "variables"],
            extension="txt",
            subdirs=False,
            format="text",
            encoding="utf-8",
            delete_on_start=False)

        self._twitter_storage = FileStoreConfiguration(
            dirs=[tmpdir + os.sep + "twitter"],
            extension="txt",
            subdirs=False,
            format="text",
            encoding="utf-8",
            delete_on_start=False)

        self._spelling_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                        "spelling/corpus.txt",
                                                        format="text",
                                                        encoding="utf-8",
                                                        delete_on_start=False)

        self._license_storage = FileStoreConfiguration(file=tmpdir + os.sep +
                                                       "licenses/license.keys",
                                                       format="text",
                                                       encoding="utf-8",
                                                       delete_on_start=False)

        self._pattern_nodes_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "nodes/pattern_nodes.txt",
            format="text",
            encoding="utf-8",
            delete_on_start=False)
        self._template_nodes_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "nodes/template_nodes.txt",
            format="text",
            encoding="utf-8",
            delete_on_start=False)

        self._binaries_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "braintree/braintree.bin",
            format="binary",
            encoding="utf-8",
            delete_on_start=False)
        self._braintree_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "braintree/braintree.xml",
            format="xml",
            encoding="utf-8",
            delete_on_start=False)

        self._preprocessors_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "processing/preprocessors.txt",
            format="text",
            encoding="utf-8",
            delete_on_start=False)
        self._postprocessors_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "processing/postprocessors.txt",
            format="text",
            encoding="utf-8",
            delete_on_start=False)

        self._usergroups_storage = FileStoreConfiguration(
            file=tmpdir + os.sep + "security/usergroups.yaml",
            format="yaml",
            encoding="utf-8",
            delete_on_start=False)
Esempio n. 19
0
 def __init__(self, name, throwexcept=False):
     BaseConfigurationData.__init__(self, name)
     self._throwexcept = throwexcept
Esempio n. 20
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "oob")
     self._default = None
     self._oobs = {}
Esempio n. 21
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "test")
Esempio n. 22
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "security")
     self._authorisation = None
     self._authentication = None
Esempio n. 23
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="mongo")
     self._collection = None
Esempio n. 24
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "binaries")
     self._save_binary = False
     self._load_binary = False
     self._binary_filename = None
     self._load_aiml_on_binary_fail = False
Esempio n. 25
0
 def __init__(self, name="triggers"):
     BaseConfigurationData.__init__(self, name)
     self._manager = TriggerConfiguration.LOCAL_MANAGER
Esempio n. 26
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._host = None
     self._port = None
Esempio n. 27
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "services")
     self._services = {}
Esempio n. 28
0
 def __init__(self, name):
     BaseConfigurationData.__init__(self, name)
Esempio n. 29
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="sentiment")
     self._classname = None
     self._scores = None
Esempio n. 30
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "console")
Esempio n. 31
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="storage")
     self._entity_store = {}
     self._store_configs = {}
Esempio n. 32
0
 def __init__(self, name):
     BaseConfigurationData.__init__(self, name=name)
     self._classname = None
     self._from_lang = None
     self._to_lang = None
Esempio n. 33
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._dir = None
Esempio n. 34
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "defaults")
     self._default_get = "unknown"
     self._default_property = "unknown"
     self._default_map = "unknown"
     self._learn_filename = "learnf.aiml"
Esempio n. 35
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="sqlalchemy")
     self._url = None
Esempio n. 36
0
    def __init__(self):
        BaseConfigurationData.__init__(self, name="config")

        self._conversation_logger = "conversation"
Esempio n. 37
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="job_defaults")
     self._coalesce = None
     self._max_instances = None
Esempio n. 38
0
 def __init__(self):
     self._host = "0.0.0.0"
     self._port = 80
     self._debug = False
     self._use_api_keys = False
     BaseConfigurationData.__init__(self, "rest")
Esempio n. 39
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="jobstore")
     self._name = None
     self._jobstore = None
Esempio n. 40
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._host = "localhost"
     self._port = 6379
     self._password = None
     self._prefix = None
Esempio n. 41
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="redis")
     self._jobs_key = None
     self._run_times_key = None
Esempio n. 42
0
    def __init__(self):
        BaseConfigurationData.__init__(self, name="config")

        self._url = 'mongodb://localhost:27017/'
        self._database = "programy"
        self._drop_all_first = True
Esempio n. 43
0
 def check_for_license_keys(self, license_keys):
     BaseConfigurationData.check_for_license_keys(self, license_keys)
Esempio n. 44
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "braintree")
     self._file = None
     self._content = None
Esempio n. 45
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "test")
Esempio n. 46
0
 def __init__(self, service_name):
     BaseConfigurationData.__init__(self, service_name)
     self._classname = None
     self._denied_srai = None
     self._usergroups = None
Esempio n. 47
0
 def __init__(self):
     self._host = "0.0.0.0"
     self._port = 80
     self._debug = False
     self._use_api_keys = False
     BaseConfigurationData.__init__(self, "webchat")
Esempio n. 48
0
 def __init__(self, oob_name):
     BaseConfigurationData.__init__(self, oob_name)
     self._classname = None