Example #1
0
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
Example #2
0
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
Example #3
0
def package():
    return get_package()
Example #4
0
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)
Example #5
0
def package():
    return get_package()
Example #6
0
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)