Download corpus

    :param string name: corpus name
    :param bool force: force install

def download(name: str, force: bool = False):
    """
    Download corpus

    :param string name: corpus name
    :param bool force: force install
    """
    db = TinyDB(corpus_db_path())
    temp = Query()
    data = requests.get(corpus_db_url())
    data_json = data.json()
    if name in list(data_json.keys()):
        temp_name = data_json[name]
        print("Download:", name)

        if not db.search(temp.name == name):
            print(name + " " + temp_name["version"])
            _download(temp_name["download"], temp_name["file_name"])
            db.insert(
                {
                    "name": name,
                    "version": temp_name["version"],
                    "file": temp_name["file_name"],
                }
            )
        else:
            if not db.search(
                temp.name == name and temp.version == temp_name["version"]
            ):
                print("Alert: New version is ready to be updated.")
                print(
                    "from "
                    + name
                    + " "
                    + db.search(temp.name == name)[0]["version"]
                    + " update to "
                    + name
                    + " "
                    + temp_name["version"]
                )
                yes_no = "y"
                if not force:
                    yes_no = str(input("yes or no (y / n) : ")).lower()
                if "y" == yes_no:
                    _download(temp_name["download"], temp_name["file_name"])
                    db.update({"version": temp_name["version"]}, temp.name == name)
            else:
                print("Redownload")
                print(
                    "from "
                    + name
                    + " "
                    + db.search(temp.name == name)[0]["version"]
                    + " update to "
                    + name
                    + " "
                    + temp_name["version"]
                )
                yes_no = "y"
                if not force:
                    yes_no = str(input("yes or no (y / n) : ")).lower()
                if "y" == yes_no:
                    _download(temp_name["download"], temp_name["file_name"])
                    db.update({"version": temp_name["version"]}, temp.name == name)
    db.close()