# simplebayes.categories module

class simplebayes.categories.BayesCategories

  Bases: `object`

  Acts as a container for various bayes trained categories of content

  add_category(name: str) → BayesCategory

    Adds a bayes category that we can later train

    Parameters:

      name (str) – name of the category

    Returns:

      the requested category

    Return type:

      BayesCategory

  delete_category(name: str) → None

    Deletes an existing category when present.

    Parameters:

      name (str) – name of the category

  get_categories() → Dict[str, BayesCategory]
    Returns:

      dict of all categories

    Return type:

      dict

  get_category(name: str) → BayesCategory

    Returns the expected category. Will KeyError if non existent

    Parameters:

      name (str) – name of the category

    Returns:

      the requested category

    Return type:

      BayesCategory