Exemplo 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
Exemplo 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
Exemplo 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")
Exemplo 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
Exemplo 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")
Exemplo 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"))
Exemplo 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")
Exemplo n.º 8
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "nodes")
     self._pattern_nodes = None
     self._template_nodes = None
Exemplo n.º 9
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="processpool")
     self._max_workers = None
Exemplo n.º 10
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="tokenizer")
     self._classname = None
     self._split_chars = " "
Exemplo n.º 11
0
 def __init__(self, name):
     BaseConfigurationData.__init__(self, name)
Exemplo n.º 12
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "dynamic")
     self._dynamic_sets = {}
     self._dynamic_maps = {}
     self._dynamic_vars = {}
Exemplo 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
Exemplo n.º 14
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="job_defaults")
     self._coalesce = None
     self._max_instances = None
Exemplo n.º 15
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="splitter")
     self._classname = BotSentenceSplitterConfiguration.DEFAULT_CLASSNAME
     self._split_chars = BotSentenceSplitterConfiguration.DEFAULT_SPLITCHARS
Exemplo 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
Exemplo n.º 17
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="mongo")
     self._collection = None
Exemplo 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)
Exemplo n.º 19
0
 def __init__(self, name, throwexcept=False):
     BaseConfigurationData.__init__(self, name)
     self._throwexcept = throwexcept
Exemplo n.º 20
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "oob")
     self._default = None
     self._oobs = {}
Exemplo n.º 21
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "test")
Exemplo n.º 22
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "security")
     self._authorisation = None
     self._authentication = None
Exemplo n.º 23
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="mongo")
     self._collection = None
Exemplo 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
Exemplo n.º 25
0
 def __init__(self, name="triggers"):
     BaseConfigurationData.__init__(self, name)
     self._manager = TriggerConfiguration.LOCAL_MANAGER
Exemplo n.º 26
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._host = None
     self._port = None
Exemplo n.º 27
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "services")
     self._services = {}
Exemplo n.º 28
0
 def __init__(self, name):
     BaseConfigurationData.__init__(self, name)
Exemplo n.º 29
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="sentiment")
     self._classname = None
     self._scores = None
Exemplo n.º 30
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "console")
Exemplo n.º 31
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="storage")
     self._entity_store = {}
     self._store_configs = {}
Exemplo n.º 32
0
 def __init__(self, name):
     BaseConfigurationData.__init__(self, name=name)
     self._classname = None
     self._from_lang = None
     self._to_lang = None
Exemplo n.º 33
0
 def __init__(self, config_name):
     BaseConfigurationData.__init__(self, name=config_name)
     self._dir = None
Exemplo 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"
Exemplo n.º 35
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="sqlalchemy")
     self._url = None
Exemplo n.º 36
0
    def __init__(self):
        BaseConfigurationData.__init__(self, name="config")

        self._conversation_logger = "conversation"
Exemplo n.º 37
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="job_defaults")
     self._coalesce = None
     self._max_instances = None
Exemplo 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")
Exemplo n.º 39
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="jobstore")
     self._name = None
     self._jobstore = None
Exemplo 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
Exemplo n.º 41
0
 def __init__(self):
     BaseConfigurationData.__init__(self, name="redis")
     self._jobs_key = None
     self._run_times_key = None
Exemplo n.º 42
0
    def __init__(self):
        BaseConfigurationData.__init__(self, name="config")

        self._url = 'mongodb://localhost:27017/'
        self._database = "programy"
        self._drop_all_first = True
Exemplo n.º 43
0
 def check_for_license_keys(self, license_keys):
     BaseConfigurationData.check_for_license_keys(self, license_keys)
Exemplo n.º 44
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "braintree")
     self._file = None
     self._content = None
Exemplo n.º 45
0
 def __init__(self):
     BaseConfigurationData.__init__(self, "test")
Exemplo n.º 46
0
 def __init__(self, service_name):
     BaseConfigurationData.__init__(self, service_name)
     self._classname = None
     self._denied_srai = None
     self._usergroups = None
Exemplo 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")
Exemplo n.º 48
0
 def __init__(self, oob_name):
     BaseConfigurationData.__init__(self, oob_name)
     self._classname = None