How to use the sense2vec.about.__default_model__ function in sense2vec

To help you get started, we’ve selected a few sense2vec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github explosion / sense2vec / sense2vec / download.py View on Github external
def main(force=False):
    if force:
        sputnik.purge(about.__title__, about.__version__)

    try:
        sputnik.package(about.__title__, about.__version__, about.__default_model__)
        print("Model already installed. Please run '%s --force to reinstall." % sys.argv[0], file=sys.stderr)
        sys.exit(1)
    except (PackageNotFoundException, CompatiblePackageNotFoundException):
        pass

    package = sputnik.install(about.__title__, about.__version__, about.__default_model__)

    try:
        sputnik.package(about.__title__, about.__version__, about.__default_model__)
    except (PackageNotFoundException, CompatiblePackageNotFoundException):
        print("Model failed to install. Please run '%s --force." % sys.argv[0], file=sys.stderr)
        sys.exit(1)

    print("Model successfully installed.", file=sys.stderr)
github explosion / sense2vec / sense2vec / download.py View on Github external
def main(force=False):
    if force:
        sputnik.purge(about.__title__, about.__version__)

    try:
        sputnik.package(about.__title__, about.__version__, about.__default_model__)
        print("Model already installed. Please run '%s --force to reinstall." % sys.argv[0], file=sys.stderr)
        sys.exit(1)
    except (PackageNotFoundException, CompatiblePackageNotFoundException):
        pass

    package = sputnik.install(about.__title__, about.__version__, about.__default_model__)

    try:
        sputnik.package(about.__title__, about.__version__, about.__default_model__)
    except (PackageNotFoundException, CompatiblePackageNotFoundException):
        print("Model failed to install. Please run '%s --force." % sys.argv[0], file=sys.stderr)
        sys.exit(1)

    print("Model successfully installed.", file=sys.stderr)