def __init__(self, language=None):
    import spacy
    self.language = (language or languages.ENG)
    punc = '！？｡＂＃＄％＆＇（）＊＋，－／：；＜＝＞＠［＼］＾＿｀｛｜｝～｟｠｢｣､、〃》「」『』【】〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏.'
    self.punctuation_table = str.maketrans(dict.fromkeys((string.punctuation + punc)))
    language = self.language.ISO_639_1.lower()
    if (language == 'zh'):
        self.nlp = Chinese()
    else:
        self.nlp = spacy.load(language)
def __init__(self, language=None):
    import spacy
    self.language = (language or languages.ENG)
    punc = '！？｡＂＃＄％＆＇（）＊＋，－／：；＜＝＞＠［＼］＾＿｀｛｜｝～｟｠｢｣､、〃》「」『』【】〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏.'
    self.punctuation_table = str.maketrans(dict.fromkeys((string.punctuation + punc)))
    language = self.language.ISO_639_1.lower()
    if (language == 'zh'):
        self.nlp = Chinese()
    else:
        self.nlp = spacy.load(language)