pyTweetBot.learning package¶
Subpackages¶
Submodules¶
pyTweetBot.learning.CensorModel module¶
pyTweetBot.learning.Classifier module¶
pyTweetBot.learning.Dataset module¶
-
class
pyTweetBot.learning.Dataset.
Dataset
¶ Bases:
object
A dataset of URL and title for training
-
add_negative
(text)¶ Add a positive sample :param text: :return:
-
add_positive
(text)¶ Add a positive sample :param text: :return:
-
data
¶ Data :return:
-
get_texts
()¶ Get texts :return:
-
is_in
(ttext)¶ Is in dataset? :param ttext: :return:
-
static
load
(opt)¶ Load the model from DB or file :param opt: Loading option :return: The model class
-
next
()¶ Next element :return:
-
save
(filename)¶ Save the dataset :param filename:
-
targets
¶ Targets :return:
-
to_json
()¶ To JSON :return:
-
pyTweetBot.learning.DecisionTree module¶
pyTweetBot.learning.Model module¶
pyTweetBot.learning.NaiveBayesClassifier module¶
Module contents¶
-
class
pyTweetBot.learning.
CensorModel
(config)¶ Bases:
object
Forbidden words classifier
-
static
load_censor
(config)¶ Load a complete model and censor with path to model :param config: :return:
-
static
-
class
pyTweetBot.learning.
Dataset
¶ Bases:
object
A dataset of URL and title for training
-
add_negative
(text)¶ Add a positive sample :param text: :return:
-
add_positive
(text)¶ Add a positive sample :param text: :return:
-
data
¶ Data :return:
-
get_texts
()¶ Get texts :return:
-
is_in
(ttext)¶ Is in dataset? :param ttext: :return:
-
static
load
(opt)¶ Load the model from DB or file :param opt: Loading option :return: The model class
-
next
()¶ Next element :return:
-
save
(filename)¶ Save the dataset :param filename:
-
targets
¶ Targets :return:
-
to_json
()¶ To JSON :return:
-