pyaiml21.graphmaster.mongo_gm.MongoGraphMaster

class pyaiml21.graphmaster.mongo_gm.MongoGraphMaster(bot_config: pyaiml21.botconfig.config.BotConfig, collection: pymongo.collection.Collection[Any], policy: Union[str, Callable[[Any, Any], Any]] = 'keep_last')[source][source]

Store the template nodes in the MongoDB.

Methods

add_pattern_tag

Add pattern tag to the known tags of this graphmaster.

dump

Store the graphmaster into the specified file.

generate_html

Store graphmaster to html file.

load

Load the graphmaster from the file, after it was saved using dump.

load_obj

Load template from the database.

match

Find the matching Pattern Path.

save

Save the category into the graphmaster.

save_obj

Save obj to the database.

size

Return the number of AIML categories.

validate

Validate the category, check its syntax.

vocabulary

Implement <vocabulary> tag.

Attributes

THAT

TOPIC

load_obj(saved_obj: bson.objectid.ObjectId) Any[source][source]

Load template from the database.

save_obj(obj: Any) bson.objectid.ObjectId[source][source]

Save obj to the database.