No project description provided
Project description
semsimian
Semsimian is a package to provide fast semantic similarity calculations for ontologies. It is a Rust library with a Python interface.
This includes implementation of Jaccard and Resnik similarity of terms in an ontology, as well as a method to calculate the similarity of two sets of terms (so-called termset similarity). Other methods will be added in the future.
Semsimian is currently integrated into OAK and the Monarch app to provide fast semantic similarity calculations.
Installation
- Set up your virtual environment of choice.
- cd
semsimian
(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.
>>> from semsimian import Semsimian
>>> s = Semsimian([('banana', 'is_a', 'fruit'), ('cherry', 'is_a', 'fruit')])
>>> s.jaccard_similarity('banana', 'cherry')
This should yield a value of 1.0.
Releases
As of version 0.1.14, the semsimian source is released on GitHub, with a corresponding set of Python wheels released to Pypi.
To trigger a new set of builds, first update the version number in Cargo.toml
, then create a new release.
Wheels are prepared for the following environments and architectures:
OS | Architectures | Python Versions |
---|---|---|
Linux | x86_64, x86_64-unknown-linux-musl, aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl | 3.7, 3.8, 3.9, 3.10, 3.11 |
MacOS | x86_64, universal2 | 3.7, 3.8, 3.9, 3.10, 3.11 |
Windows | x86_64 | 3.7, 3.8, 3.9, 3.10, 3.11 |
Troubleshooting
Building for Mac ARM M1 architectures
If a import semsimian
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.
Code Coverage via Docker
Build a docker image:
docker build -t my-rust-app .
Run your tests inside a Docker container and generate coverage:
docker run -v "$(pwd)":/usr/src/app -t my-rust-app bash -c "CARGO_INCREMENTAL=0 RUSTFLAGS='-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort' cargo test && grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/"
Get Coverage report from:
open ./target/debug/coverage/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for semsimian-0.2.10-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed246c975e5246fa450dcbcf54ab3dea181d07dcf95c668f50e1ca201cdb95e9 |
|
MD5 | 81ab7f577bc6a751a67eddf4aca19ab5 |
|
BLAKE2b-256 | 6d331e0d5e9c6190de1672feb332c1cecda01c3eeb3ff530630349d7aac2646c |
Hashes for semsimian-0.2.10-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89715d1cec132bc2878790c797b804c1f6fa81821fa44cb6599be0b95f542565 |
|
MD5 | f1b7995a957ab7f90f9f8de477085ed7 |
|
BLAKE2b-256 | 45986aa48086156de3bbee5dea46eab6f8fb35c662573569fe896a18f9693dca |
Hashes for semsimian-0.2.10-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf744bae7b7d140444675b64a87d489576e5c830995f2e44e2fd24a607c07fe |
|
MD5 | 759457c99cf76274966f2e323b92f425 |
|
BLAKE2b-256 | 243c1d4faf0ce9bcf96759cd47d4dd161ca85a2b9ba673c177ea54bffb30870c |
Hashes for semsimian-0.2.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a75873c8462b0d7699df137949ed34ecf580d0dfd99eb1a6371be5782f0b2bd |
|
MD5 | 2b840767d3c8df80b932d5650f71cd79 |
|
BLAKE2b-256 | 8bc1e5d81afeebbcc075ed18ce04dc3773c3e02bcff29af4b3a6b896103ffdcf |
Hashes for semsimian-0.2.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7587ded25a49d2fcd9accb96433f87187c666d06ec2c44f6380ff635e7470a4c |
|
MD5 | dcfe9f4ea5ff4ddb47977dce16b3eb17 |
|
BLAKE2b-256 | bc7040835e5ca6f236c295554f88805e4883f804d2aeca078a99816e57b7a0e0 |
Hashes for semsimian-0.2.10-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21bf4119b443b33cbac06d7a24265083c6fd7b029329340571bc1dd7571dfaac |
|
MD5 | c6c61aa56fa681c863d62f9aa1a6e8f8 |
|
BLAKE2b-256 | 48d0b8c1b66c621a2b49ac53623903f137f2086a7ca78e719ee728e2aefd085a |
Hashes for semsimian-0.2.10-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2d17c15f1c74eb429872a01a58d1d93d5daac7f5e9470ef5eb1551e39def862 |
|
MD5 | df2b3077bfbc872be85e15e19f4d54bd |
|
BLAKE2b-256 | 2a152d418323e7313c7d054f567dc1f3ca0a46e1ab2184bcda03e0d77bad6996 |
Hashes for semsimian-0.2.10-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 550505c4f6ea380c9cab2b37542081d9153a73a9209ff4638f813f3b8c078b35 |
|
MD5 | dccd539a0113e40d40f8e90fab29058b |
|
BLAKE2b-256 | 56453681ddb86aa20da60e9fc2b346c6e763c2a47cb1c3f5b5fd89f05702e7b6 |
Hashes for semsimian-0.2.10-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d31652d668e104ab0df9ca5a1d4534f6f2c59a9abed260e2391c4ce7c88065d6 |
|
MD5 | bc4f6a27e42ef7d41efc69b215bf67f6 |
|
BLAKE2b-256 | 3d5ba7b99ea0957fc9a4c941e9d2a14d69cd7b63a548e604218d3944de2d119e |
Hashes for semsimian-0.2.10-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e02832b628c2d143d76167bfe05035c90936f85e24d2bcd3b107ae2d79884d07 |
|
MD5 | 368c3e59d0c7115c11df4c42985c7be4 |
|
BLAKE2b-256 | 5d9e46a9e399fce8474ebe41a0e41a4bfab4c96c16b1f3b02f9a73d2b436dfc0 |
Hashes for semsimian-0.2.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 054fc65ce937912889738106de4961ac0ee96d3e033a9ba222ff614e2f3642b4 |
|
MD5 | 1996517c22fb97748e55905ed345382a |
|
BLAKE2b-256 | e137818c5d3042b26504d8a410f832c8a2cc97ca6b886b5c9c6f91f410de6d12 |
Hashes for semsimian-0.2.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c5ed817e79bd1ec57b00b4c637cd5ead230d26335249f1133f471bc7b965a28 |
|
MD5 | 63273c859086ff9a8c6f6ee81ef6cec4 |
|
BLAKE2b-256 | fab7a3073094ecaaf27ded77ec328dc64fff6c8e5ff05d89f2a20d6e704d9367 |
Hashes for semsimian-0.2.10-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08aa3c25eae0fcd0409d523883b16e729782296fd95aa1c0b1b8ba61bfc43273 |
|
MD5 | 54b086ebbbe77185c814654eeaebfc3f |
|
BLAKE2b-256 | ddf15c7afc4ff894604514396038708c04b1642cf7cdd534edeefa7b65205ce4 |
Hashes for semsimian-0.2.10-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5a1dfc85e7086f83bbcf4d341149f517f31a2b32affccc28ce102b0dd4d2275 |
|
MD5 | fae5ff251b906feb9473b01dc863dc33 |
|
BLAKE2b-256 | 9d5dfaf9fda2873deba16c370b8287a67c063e07c83a9857effba33018fb292f |
Hashes for semsimian-0.2.10-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7479880acf54a307b37ebba545f917731fc0229c277960a32d431aa8d28d2cba |
|
MD5 | 9ea592177295cacd000a789d95d4add4 |
|
BLAKE2b-256 | 27c9da08af8df0bb5f6e936042bfaa87b19eb7337884e4dd6c9aceda5a4ae435 |
Hashes for semsimian-0.2.10-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdd7abb17463963ed03a2741a77ac5072aec29d58655d0edebb89ec24335c5fb |
|
MD5 | e7799e1a887900ae9915e275fd24bcf6 |
|
BLAKE2b-256 | 71f1e00d4e8c9d11f920af8d8f56d6338a666cac8f367df19249891aef6bf286 |
Hashes for semsimian-0.2.10-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c0a875549be8f43e4df819585ffa0eb27cd1b687a83d544961861f72820aa5c |
|
MD5 | ad8f80a7af2fae174aec2ad8233682e6 |
|
BLAKE2b-256 | ffe5981c1b5fd224d450474654a1b7ace1f216e834fb8dabade63fa3a5cd53f5 |
Hashes for semsimian-0.2.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99d27f2bad5faa9038e742f7d04eca93de3b45ffa4723a2aef6b633c52ff9810 |
|
MD5 | c613be0cde769a06a94482ace4a1f861 |
|
BLAKE2b-256 | a74a6e19ae34326f543df393e334146f5690294cc63164f27b8b7209e30a47ec |
Hashes for semsimian-0.2.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a0743cfe1975a80402895c474c4c9c8e0f1504a1f4c75c820b74ee4605778f0 |
|
MD5 | 67959719b3c9dc5d91a470766bc21eed |
|
BLAKE2b-256 | 54662a7f766d612cc6608811da3f1718c19c45a325c6bff471f0e550dc5d57fd |
Hashes for semsimian-0.2.10-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 084c8e96c2de277c4816331909a2f932c2b548d8cbf6dbb71e50f6868078cbfb |
|
MD5 | 7734d133ddf33edc52352db64fda4232 |
|
BLAKE2b-256 | 380d84b7321a87dd729165664db21d69c8c506cdd842c9ff00999a21611a8390 |
Hashes for semsimian-0.2.10-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2377e24fd0a853cce7a1fc283c5586b6abca4076c8b2e5b3923cfc72554a0525 |
|
MD5 | d0979d1716ed8cc9c7c40da3981041b5 |
|
BLAKE2b-256 | 61775f46698c9497fac675425663331a2941d1c29652baa28ce4a102508cc959 |
Hashes for semsimian-0.2.10-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14d69a1be646a09f9de2843e4921a1e8bd187f2a3be7784b377dc5eb3a2c40f7 |
|
MD5 | 7b8e4d5b637a1f7bd9327afdbf64e9db |
|
BLAKE2b-256 | f87be3007c671fcf8287a18ec2ce9b714ef0dea0ea3c33761177538c0868aabd |
Hashes for semsimian-0.2.10-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8fd6197a1d49a13b013c2d695554a1434f45d7a1565d20814165d8bd78adcf7 |
|
MD5 | 5c66554bc18714e5a4b7daccbe75e36f |
|
BLAKE2b-256 | e23181e2a5fc035b5ee1cd34a76624260edab212f72ef019a0d8a301a090b5b8 |
Hashes for semsimian-0.2.10-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa1da65df76a3def5af47c084db075d6ce985ca107dc4dcdc044ca97b0ca6ada |
|
MD5 | 56e0a8f451dc7b79bddafbdfed67fe1e |
|
BLAKE2b-256 | ab98659aeabf4619733571e8e55d5e7c6763fa1bf4b271e6d32deb87368af930 |
Hashes for semsimian-0.2.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8fffdec865c59c26c0ea4de3012aa9d98fddbffd5e67de5e8f51f19d9172212 |
|
MD5 | 9c2a5884088a69c83469f61f77bcf6d4 |
|
BLAKE2b-256 | 90d86eba2b599eb1ade908642604c2432a0e12b8ea398f9efac9e6fb00ac884c |
Hashes for semsimian-0.2.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a28b1548652fac56704d94b9c6d53129faad942e14e1d1503bc441e01b4e5c |
|
MD5 | 594a817e004b7af5ab1a4b5ee007ff30 |
|
BLAKE2b-256 | caaed34b837065f0d3609668a7616443b1100ee7a8b1c3dc46a41b37552531df |
Hashes for semsimian-0.2.10-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 883ac1dd623abbb013bae2c0a16a96ab633885a909ccd674bd2a0280e4c2aab8 |
|
MD5 | 36388132d398f6b497b3883eea251c72 |
|
BLAKE2b-256 | 7226c7bf14297562d1f612509e3aa78fe4c15161cf2f5278c02a12de54472528 |
Hashes for semsimian-0.2.10-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42f0c73f81400b01caea77a33371d27b4e97b447732d092c39deb8ea44a093e1 |
|
MD5 | ab3337fd15b9bcb9479b9f808c01a9a0 |
|
BLAKE2b-256 | aade0e4130faca8d0e8d15d73377d4c0a13e6569ff0cc4b382c1599501132985 |
Hashes for semsimian-0.2.10-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc5bf92b72cf19f52fa95b860f03e77c6cb6030e5030451ab25a0ecb6bf956e3 |
|
MD5 | 05aa25b1d366e85cce620e91e8b8e679 |
|
BLAKE2b-256 | 9a4bedba12cedcc59bddcabfbc61909442762b3beb9f4d80ae814a406d22f473 |
Hashes for semsimian-0.2.10-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c553316ff06d5bc315e3604ac23bdf1943dff39eb599b65d174341bf7f9c1770 |
|
MD5 | 72ff4dc59656d98b315fdb2375d056ff |
|
BLAKE2b-256 | 646ffe64289bec54d6b71184c1ddd4e4f03aa9b9d506d5daa12c12e95749abb1 |
Hashes for semsimian-0.2.10-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ef2c1505b0fe0a4002d3a2dcef737aa7e6d3a13a190e7a39829a14ec4674d67 |
|
MD5 | 4994c9a7da6f4be0cb0928838d2e3391 |
|
BLAKE2b-256 | fb55985d8550144eadeb8b22405d96fc5bdf1f75c6b355eb45aef58d7c558d80 |
Hashes for semsimian-0.2.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9308fd32022efe01b5abd75deadd7df37824b7fd505af1872539b80cb548918 |
|
MD5 | 627756f9c0c510df3aee25484c6a9a7d |
|
BLAKE2b-256 | 175d8f427b8fc656b6f4314a0848152e2b40d3dd2eb93d8782022b1d116231cd |
Hashes for semsimian-0.2.10-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1cbc55033a24254ce944ae4c132b3da23a36e9c2613d273e5073f6d170acd09 |
|
MD5 | 4a04b2e67f79c5dd2fa25705f275e54a |
|
BLAKE2b-256 | e8b768197983d2c49065545247244ac6ae35620aee730d461a081884561fdb14 |
Hashes for semsimian-0.2.10-cp37-cp37m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86acb9abfaa9383e9868453e5fe799c0d392590666c1f8bc8d0a8fe7a01e33e5 |
|
MD5 | 6f6ce4201008d643a2124d0154a6a184 |
|
BLAKE2b-256 | 311d6ff79fa1da2b9a08bd9e657c63ea80971758ef585adf3dd34200c96bd25a |
Hashes for semsimian-0.2.10-cp37-cp37m-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 343dbb774332dbfd62b144c37b134efa76cb89ac7bb1fe6a393329000e2b9fb0 |
|
MD5 | ca6085cd8c4436ec5320f37f1847d3cd |
|
BLAKE2b-256 | 28fd15ab5fb7770446b9311db6203dd880e9ffc2ea338695de10767a5f3ebf3d |