def savemodel(self, nameprefix): """ Save the model to files. This is an abstract method of this abstract class, which raise the `NotImplementedException`. :param nameprefix: prefix of the paths of the model files :return: None :raise: NotImplementedException :type nameprefix: str """ raise e.NotImplementedException()
def get_batch_cos_similarities(self, shorttext): """ Calculate the cosine similarities of the given short text and all the class labels. This is an abstract method of this abstract class, which raise the `NotImplementedException`. :param shorttext: short text :return: topic vector :raise: NotImplementedException :type shorttext: str :rtype: numpy.ndarray """ raise e.NotImplementedException()
def retrieve_topicvec(self, shorttext): """ Calculate the topic vector representation of the short text. This is an abstract method of this abstract class, which raise the `NotImplementedException`. :param shorttext: short text :return: topic vector :raise: NotImplementedException :type shorttext: str :rtype: numpy.ndarray """ raise e.NotImplementedException()
def train(self, classdict, *args, **kwargs): """ Train the stacked generalization. Not implemented. `NotImplemntedException` raised. :param classdict: training data :param args: arguments to be parsed :param kwargs: arguments to be parsed :return: None :type classdict: dict :type args: dict :type kwargs: dict :raise: NotImplementedException """ raise e.NotImplementedException()
def train(self, classdict, nb_topics, *args, **kwargs): """ Train the modeler. This is an abstract method of this abstract class, which raise the `NotImplementedException`. :param classdict: training data :param nb_topics: number of latent topics :param args: arguments to be passed into the wrapped training functions :param kwargs: arguments to be passed into the wrapped training functions :return: None :raise: NotImplementedException :type classdict: dict :type nb_topics: int """ self.nb_topics = nb_topics raise e.NotImplementedException()
def score(self, shorttext, *args, **kwargs): """ Calculate the scores for each class labels. Not implemented. `NotImplemntedException` raised. :param shorttext: short text to be scored :param args: arguments to be parsed :param kwargs: arguments to be parsed :return: dictionary of scores for all class labels :type shorttext: str :type args: dict :type kwargs: dict :rtype: dict :raise: NotImplementedException """ raise e.NotImplementedException()
def score(self, shorttext): raise e.NotImplementedException()
def train(self, classdict): raise e.NotImplementedException()