def main(childes_xml_remote_root='http://childes.psy.cmu.edu/data-xml/', verbose=False):
    user_data_path = Downloader.default_download_dir(Downloader())
    childes_corpus_path = os.path.join(user_data_path, 'corpora/CHILDES/')

    try:
        os.makedirs(childes_corpus_path)
    except OSError:
        pass

    CHILDESDir(childes_xml_remote_root, childes_corpus_path).download(verbose)
Exemple #2
0
def nltk_updater():
    packages = Set(['brown',
                    'wordnet',
                    'wordnet_ic',
                    'maxent_treebank_pos_tagger',
                    'universal_tagset'])
    d = Downloader()
    for dirpath, dirnames, filenames in os.walk(d.default_download_dir()):
        module = os.path.basename(dirpath)
        if module in packages:
            packages.remove(module)
    for module in packages:
        print 'Missing', module
        download(module)
Exemple #3
0
import os

from nltk.downloader import Downloader
from childespy import CHILDESDir

childes_xml_remote_root = 'http://childes.psy.cmu.edu/data-xml/'

user_data_path = Downloader.default_download_dir(Downloader())
childes_corpus_path = os.path.join(user_data_path, 'corpora/CHILDES/')

try:
    os.makedirs(childes_corpus_path)
except OSError:
    pass

CHILDESDir(childes_xml_remote_root, childes_corpus_path).download()
import os

from nltk.downloader import Downloader
from childespy import CHILDESDir

childes_xml_remote_root='http://childes.psy.cmu.edu/data-xml/'

user_data_path = Downloader.default_download_dir(Downloader())
childes_corpus_path = os.path.join(user_data_path, 'corpora/CHILDES/')

try:
    os.makedirs(childes_corpus_path)
except OSError:
    pass

CHILDESDir(childes_xml_remote_root, childes_corpus_path).download()