'Checks if the spacy language model is properly loaded. Raises an exception if the model is invalid.'

@staticmethod
def ensure_proper_language_model(nlp):

    if (nlp is None):
        raise Exception(u"Failed    to    load    spacy    language    model.    Loading    the    model    returned    'None'.")
    if (nlp.path is None):
        raise Exception((u"Failed    to    load    spacy    language    model    for    lang    '{}'.    ".format(nlp.lang) + u'Make    sure    you    have    downloaded    the    correct    model    (https://spacy.io/docs/usage/).'))
