def vocab(): data_dir = os.environ.get('SPACY_DATA') if data_dir is None: package = util.get_package_by_name('en') else: package = util.get_package(data_dir) vocab = English.default_vocab(package=package) lex = vocab['dog'] assert vocab[vocab.strings['dog']].orth_ == 'dog' lex = vocab['the'] lex = vocab['quick'] lex = vocab['jumped'] return vocab
def package(): return get_package()
def package(): data_dir = os.environ.get('SPACY_DATA') if data_dir is None: return util.get_package_by_name() else: return util.get_package(data_dir)