# Path: shorttext/utils/textpreprocessing.py
# def preprocess_text(text, pipeline):
# def text_preprocessor(pipeline):
# def oldschool_standard_text_preprocessor(stopwordsfile):
# def standard_text_preprocessor_1():
# def standard_text_preprocessor_2():
# 
# Path: shorttext/utils/gensim_corpora.py
# def generate_gensim_corpora(classdict, preprocess_and_tokenize=tokenize):
# def save_corpus(dictionary, corpus, prefix):
# def load_corpus(prefix):
# def update_corpus_labels(dictionary, corpus, newclassdict, preprocess_and_tokenize=tokenize):
# def tokens_to_fracdict(tokens):
# 
# Path: shorttext/utils/classification_exceptions.py
# class ModelNotTrainedException(Exception):
# class AlgorithmNotExistException(Exception):
# class WordEmbeddingModelNotExistException(Exception):
# class UnequalArrayLengthsException(Exception):
# class NotImplementedException(Exception):
# class IncorrectClassificationModelFileException(Exception):
# class OperationNotDefinedException(Exception):
#     def __init__(self):
#     def __init__(self, algoname):
#     def __init__(self, path):
#     def __init__(self, arr1, arr2):
#     def __init__(self):
#     def __init__(self, expectedname, actualname):
#     def __init__(self, opname):
# 
# Path: shorttext/utils/textpreprocessing.py
# def preprocess_text(text, pipeline):
# def text_preprocessor(pipeline):
# def oldschool_standard_text_preprocessor(stopwordsfile):
# def standard_text_preprocessor_1():
# def standard_text_preprocessor_2():


from abc import ABC, abstractmethod
from shorttext.utils import textpreprocessing as textpreprocess, gensim_corpora as gc, classification_exceptions as e
from shorttext.utils.textpreprocessing import tokenize
import numpy as np

    def __contains__(self, shorttext):
        if not self.trained:
            raise e.ModelNotTrainedException()
        return True

    @abstractmethod
    def loadmodel(self, nameprefix):
        """ Load the model from 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()

    @abstractmethod
    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
        """

# Path: shorttext/utils/textpreprocessing.py
# def preprocess_text(text, pipeline):
# def text_preprocessor(pipeline):
# def oldschool_standard_text_preprocessor(stopwordsfile):
# def standard_text_preprocessor_1():
# def standard_text_preprocessor_2():
# 
# Path: shorttext/utils/gensim_corpora.py
# def generate_gensim_corpora(classdict, preprocess_and_tokenize=tokenize):
# def save_corpus(dictionary, corpus, prefix):
# def load_corpus(prefix):
# def update_corpus_labels(dictionary, corpus, newclassdict, preprocess_and_tokenize=tokenize):
# def tokens_to_fracdict(tokens):
# 
# Path: shorttext/utils/classification_exceptions.py
# class ModelNotTrainedException(Exception):
# class AlgorithmNotExistException(Exception):
# class WordEmbeddingModelNotExistException(Exception):
# class UnequalArrayLengthsException(Exception):
# class NotImplementedException(Exception):
# class IncorrectClassificationModelFileException(Exception):
# class OperationNotDefinedException(Exception):
#     def __init__(self):
#     def __init__(self, algoname):
#     def __init__(self, path):
#     def __init__(self, arr1, arr2):
#     def __init__(self):
#     def __init__(self, expectedname, actualname):
#     def __init__(self, opname):
# 
# Path: shorttext/utils/textpreprocessing.py
# def preprocess_text(text, pipeline):
# def text_preprocessor(pipeline):
# def oldschool_standard_text_preprocessor(stopwordsfile):
# def standard_text_preprocessor_1():
# def standard_text_preprocessor_2():


# Path: shorttext/generators/bow/LatentTopicModeling.py
from abc import ABC, abstractmethod
from shorttext.utils import textpreprocessing as textpreprocess, gensim_corpora as gc, classification_exceptions as e
from shorttext.utils.textpreprocessing import tokenize
import numpy as np


    def __contains__(self, shorttext):
        if not self.trained:
            raise e.ModelNotTrainedException()
        return True

    @abstractmethod
    def loadmodel(self, nameprefix):
        """ Load the model from 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()

    @abstractmethod
    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()