# Path: shorttext/generators/charbase/char2vec.py
# def initSentenceToCharVecEncoder(textfile, encoding=None):
#     """ Instantiate a class of SentenceToCharVecEncoder from a text file.
# 
#     :param textfile: text file
#     :param encoding: encoding of the text file (Default: None)
#     :return: an instance of SentenceToCharVecEncoder
#     :type textfile: file
#     :type encoding: str
#     :rtype: SentenceToCharVecEncoder
#     """
#     dictionary = Dictionary(map(lambda line: [c for c in line], textfile_generator(textfile, encoding=encoding)))
#     return SentenceToCharVecEncoder(dictionary)
# 
# Path: shorttext/utils/classification_exceptions.py
# class OperationNotDefinedException(Exception):
#     def __init__(self, opname):
#         self.message = 'Operation '+opname+' not defined'


import re
import string
import numpy as np
from functools import reduce
from shorttext.generators.charbase.char2vec import initSentenceToCharVecEncoder
from shorttext.utils.classification_exceptions import OperationNotDefinedException




default_alph = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.,:;'*!?`$%&(){}[]-/\@_#"
# NB. # is <eos>, _ is <unk>, @ is number
default_specialsignals = {'eos': '#', 'unk': '_', 'number': '@'}
default_signaldenotions = {'<eos>': 'eos', '<unk>': 'unk'}


class SpellingToConcatCharVecEncoder:
    def __init__(self, alph):

# Path: shorttext/generators/charbase/char2vec.py
# def initSentenceToCharVecEncoder(textfile, encoding=None):
#     """ Instantiate a class of SentenceToCharVecEncoder from a text file.
# 
#     :param textfile: text file
#     :param encoding: encoding of the text file (Default: None)
#     :return: an instance of SentenceToCharVecEncoder
#     :type textfile: file
#     :type encoding: str
#     :rtype: SentenceToCharVecEncoder
#     """
#     dictionary = Dictionary(map(lambda line: [c for c in line], textfile_generator(textfile, encoding=encoding)))
#     return SentenceToCharVecEncoder(dictionary)
# 
# Path: shorttext/utils/classification_exceptions.py
# class OperationNotDefinedException(Exception):
#     def __init__(self, opname):
#         self.message = 'Operation '+opname+' not defined'


# Path: shorttext/spell/binarize.py
import re
import string
import numpy as np
from functools import reduce
from shorttext.generators.charbase.char2vec import initSentenceToCharVecEncoder
from shorttext.utils.classification_exceptions import OperationNotDefinedException





default_alph = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.,:;'*!?`$%&(){}[]-/\@_#"
# NB. # is <eos>, _ is <unk>, @ is number
default_specialsignals = {'eos': '#', 'unk': '_', 'number': '@'}
default_signaldenotions = {'<eos>': 'eos', '<unk>': 'unk'}


class SpellingToConcatCharVecEncoder:
    def __init__(self, alph):

        self.charevec_encoder = initSentenceToCharVecEncoder(alph)