Skip to main content

No project description provided

Reason this release was yanked:

Did not publish all wheels

Project description

RustSim

  • Setup your virtual environment of choice.
  • cd rustsim (home directory of this project)
  • pip install maturin
  • maturin develop
  • python
Python 3.9.16 (main, Jan 11 2023, 10:02:19) 
[Clang 14.0.6 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import rustsim
>>> rustsim.run("tests/data/test_set.tsv", "tests/data/closures.tsv")

should yield

TermSetPairwiseSimilarity {
    set_id: "set3",
    original_subject_termset: {
        "apple",
        "orange",
        "banana",
    },
    subject_termset: {
        "fruit",
        "orange",
        "apple",
        "tropical",
        "banana",
    },
    original_object_termset: {
        "mango",
        "banana",
        "cheese",
        "papaya",
        "beef",
    },
    object_termset: {
        "mango",
        "fruit",
        "papaya",
        "banana",
        "cheese",
        "beef",
        "meat",
        "dairy",
        "tropical",
    },
    jaccard_similarity: 0.2727272727272727,
}
TermSetPairwiseSimilarity {
    set_id: "set1",
    original_subject_termset: {
        "apple",
        "orange",
        "banana",
    },
    subject_termset: {
        "fruit",
        "orange",
        "apple",
        "tropical",
        "banana",
    },
    original_object_termset: {
        "apple",
        "orange",
        "banana",
    },
    object_termset: {
        "orange",
        "banana",
        "apple",
        "tropical",
        "fruit",
    },
    jaccard_similarity: 1.0,
}
TermSetPairwiseSimilarity {
    set_id: "set2",
    original_subject_termset: {
        "apple",
        "orange",
        "banana",
    },
    subject_termset: {
        "fruit",
        "orange",
        "apple",
        "tropical",
        "banana",
    },
    original_object_termset: {
        "mango",
        "apple",
        "papaya",
    },
    object_termset: {
        "apple",
        "fruit",
        "papaya",
        "mango",
        "tropical",
    },
    jaccard_similarity: 0.42857142857142855,
}

Troubleshooting

Building for Mac ARM M1 architectures

If a import rustsim results in a ImportError warning about incompatible architecture, try the following:

  • Install conda. This guide may be helpful.
  • Set up a virtual environment with conda so that your Python build is aligned with your processor architecture (in this case, ARM). Try something like:
$ conda create -n myenv python=3.9
...setup happens...
$ conda activate myenv

and then proceed as above.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rustsim-0.1.9.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

rustsim-0.1.9-cp39-cp39-macosx_10_7_x86_64.whl (258.2 kB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

File details

Details for the file rustsim-0.1.9.tar.gz.

File metadata

  • Download URL: rustsim-0.1.9.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.13

File hashes

Hashes for rustsim-0.1.9.tar.gz
Algorithm Hash digest
SHA256 893689383007ed40763a6f0419b7e6c69134d7bf0c591214f199fade34c9749f
MD5 aea06d66d2859cf3d9f8b31a0321542e
BLAKE2b-256 662ce1480ceb70e3357b6bf360c872c8c33b3f0e084eace002f02d29f72a3e05

See more details on using hashes here.

File details

Details for the file rustsim-0.1.9-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for rustsim-0.1.9-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 c72be33c28b89efc1ff950dfab667bade490d8b15e84a076df45e4c6552ee260
MD5 1b5a3e75f14e557f8a9cd7041aaba802
BLAKE2b-256 c10b113f3f7425660487663e6300b382cc67de18e4433914d3dfe5ae212cfe27

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page