deepmorpheus/tag.py
def attempt_vocab_load(vocab_path):
    """This function will try to load the vocab file from data/vocab.p.
    If it fails it will abort execution since we need a vocabulary to correctly
    tokenize the input data"""
    if not os.path.isfile(vocab_path):
        print("Vocabulary needs to be located here: %s" % vocab_path)
        exit()
    
    print("Loading vocabulary from cache: %s" % vocab_path)
    with open(vocab_path, "rb") as f:
        vocab = pickle.load(f)
    return vocab
This function will try to load the vocab file from data/vocab.p.
    If it fails it will abort execution since we need a vocabulary to correctly
    tokenize the input data
This function will try to load the vocab file from data/vocab.p.
If it fails it will abort execution since we need a vocabulary to correctly
tokenize the input data
This function will try to load the vocab file from data / vocab . p . If it fails it will abort execution since we need a vocabulary to correctly tokenize the input data
def attempt_vocab_load(vocab_path):
    if not os.path.isfile(vocab_path):
        print("Vocabulary needs to be located here: %s" % vocab_path)
        exit()
    print("Loading vocabulary from cache: %s" % vocab_path)
    with open(vocab_path, "rb") as f:
        vocab = pickle.load(f)
    return vocab
def attempt_vocab_load ( vocab_path ) : if not os . path . isfile ( vocab_path ) : print ( "Vocabulary needs to be located here: %s" % vocab_path ) exit ( ) print ( "Loading vocabulary from cache: %s" % vocab_path ) with open ( vocab_path , "rb" ) as f : vocab = pickle . load ( f ) return vocab
This function will try to load the vocab file from data/vocab.p.
This function will try to load the vocab file from data / vocab . p .
"""This function will try to load the vocab file from data/vocab.p.
    If it fails it will abort execution since we need a vocabulary to correctly
    tokenize the input data"""
vocab_path