simplebayes.category module
- class simplebayes.category.BayesCategory(name: str)[source]
Bases:
objectRepresents a trainable category of content for bayesian classification
- get_tally() int[source]
Gets the tally of all types
- Returns:
The total number of tokens
- Return type:
int
- get_token_count(word: str) int[source]
Gets the count associated with a provided token/word
- Parameters:
word (str) – the token we’re getting the weight of
- Returns:
the weight/count of the token
- Return type:
int