def train(self, text):
        """ Train the spell corrector with the given corpus.

        :param text: training corpus
        :type text: str
        """
        raise ce.NotImplementedException()
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
    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()
Exemplo n.º 4
0
    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()
Exemplo n.º 5
0
    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()
Exemplo n.º 6
0
    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()
Exemplo n.º 7
0
    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 train(self, text):
     raise ce.NotImplementedException()