Esempio n. 1
0
def download_ucca_model():
    url = 'https://github.com/huji-nlp/tupa/releases/download/v1.3.10/ucca-bilstm-1.3.10.tar.gz'
    temp_filepath = get_temp_filepath()
    download(url, temp_filepath)
    UCCA_DIR.mkdir(parents=True, exist_ok=True)
    untar(temp_filepath, UCCA_DIR)
    update_ucca_path()
Esempio n. 2
0
def download_ucca_model():
    url = 'https://github.com/huji-nlp/tupa/releases/download/v1.3.10/ucca-bilstm-1.3.10.tar.gz'
    temp_filepath = get_temp_filepath()
    download(url, temp_filepath)
    UCCA_DIR.mkdir(parents=True, exist_ok=True)
    untar(temp_filepath, UCCA_DIR)
    # HACK: Change vocab_path from relative to absolute path
    json_path = str(UCCA_PARSER_PATH) + '.nlp.json'
    with open(json_path, 'r') as f:
        config_json = json.load(f)
    config_json['vocab'] = str(UCCA_DIR / config_json['vocab'])
    with open(json_path, 'w') as f:
            json.dump(config_json, f)
Esempio n. 3
0
def download_stanford_corenlp():
    url = 'http://nlp.stanford.edu/software/stanford-corenlp-full-2018-10-05.zip'
    temp_filepath = get_temp_filepath()
    download(url, temp_filepath)
    STANFORD_CORENLP_DIR.mkdir(parents=True, exist_ok=True)
    unzip(temp_filepath, STANFORD_CORENLP_DIR.parent)