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.5-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52e53bac50ac34ff330f2917fbd8cb8ccc6522e01f0afe08938660624a4b183b |
|
MD5 | 97cedfccc49cd5c20818f9185115a0a5 |
|
BLAKE2b-256 | 30b93f66aebbe65b931b8a6ba71acf3c9c32ba8c74b9ff004676ba7fcc53aa55 |
Hashes for semsimian-0.2.5-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7705f90d04045ce5695c00ae36259c3d2e17482d124976543aef974926429207 |
|
MD5 | 403d6e97576a4918868c1b244b0d3ed8 |
|
BLAKE2b-256 | 96fbe9c484231bfb1d8acaad4449242479beee0a4b6f369ab893a863d3fd6aca |
Hashes for semsimian-0.2.5-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3baf687b08a09cfc30c873b2eb82c1952bcf5e85754443d0ea4163ab6f228810 |
|
MD5 | 414cd9baea5dc038279b2c295f894992 |
|
BLAKE2b-256 | e5cd44f2f3e87adabbb8020267fd9652b20202c7fa5b2b88b76c35852dcfd41a |
Hashes for semsimian-0.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ffbb0982a10cdd26a10e55cdb405a1b34dbe49a5c8cde38be9c0b317f1710a8 |
|
MD5 | fc374d33807bda83a4f4e1dc4ef0de3a |
|
BLAKE2b-256 | 632bd1414b1c88d99e52a65334f67c3a989e2f15a90cf6793a5c33aca20b3c4f |
Hashes for semsimian-0.2.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98cf6b49d751881d9de516a478c3dc8e552b5cb6579f2942e17fcf54a4b865a |
|
MD5 | 5d1badce4d23cade6bf0483acabfab2b |
|
BLAKE2b-256 | c19cc39f20f9f7f9daaab686d9b40c0021037a900962960a112f6e38a303c5fc |
Hashes for semsimian-0.2.5-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c390c2406005722cc49e7d09cbe42f9f5496f9e8538b9662716ccff4ea9464 |
|
MD5 | edd4539b87fa01efd7fbac7d6add3dba |
|
BLAKE2b-256 | 7875194ec8f4794c4769f42d56529dd1fd591679cf3dd76d344455513722e91f |
Hashes for semsimian-0.2.5-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b7939e71ccb8b8d3e371d48a351c0543545639303fae3ef483d1f3dff34ac1d |
|
MD5 | a7f88bb8b1c17f64510b8491f980ef61 |
|
BLAKE2b-256 | b1ff8ed59f8b4b6b82787bc416fed19e0b2374082f3f91dfc614de36b32ac8ea |
Hashes for semsimian-0.2.5-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4c6d256f5a6ccf4137133377a1fdffa8b250de9b2bdb55908143b40a17022e |
|
MD5 | d9dda614f29255cec79d27bc9604a863 |
|
BLAKE2b-256 | e179a85b7f95105eaef366dc1e5f517b1532df1198f02aa018509923eb6e1b7c |
Hashes for semsimian-0.2.5-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d5c5a96e05c0497f1559f5be27068280495e33564d2a1a607e9ddd39110f7f7 |
|
MD5 | 05d187a9d2efb6516a6e9c1c3764a927 |
|
BLAKE2b-256 | cba99cfcfce7be4f38c65ea39d139837618e5cbfe29ffa2611d60d05b178cbaf |
Hashes for semsimian-0.2.5-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad1d7372ef354d6a02c30f9686964ca0c8e7edd3706177731977557802d8e056 |
|
MD5 | 03e99b5b0799935b47384cae8db13284 |
|
BLAKE2b-256 | 91b59780a0c856f3ed65e0a62ff7f7a685b155c65f0012c78f7d3b8c14656ea0 |
Hashes for semsimian-0.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8d74215c8fc749051f3ea6814656882dbb6befd15a6b5cce6ff8da54db8cff9 |
|
MD5 | 50b6a10cb78747c2f5345dccb6914d9d |
|
BLAKE2b-256 | cc50b97bd8a03fd0d830ccc806eb1d7ca963c7636193fe1697786af26698557a |
Hashes for semsimian-0.2.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f3f22c90969d988d8fe51f7d3288f1ebdf9d0f90b92043d5fc52230fb0c1db4 |
|
MD5 | 9255e01db8214faaf56cf64466dde06d |
|
BLAKE2b-256 | 108be6d4e78fb05682696f8c6db08e0872df6639eae944b1fd2efbfeb80a06f0 |
Hashes for semsimian-0.2.5-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89cb8c45811a095c56191f4a3daa66485ba6de88d5c9da2cf673b529bbd290d7 |
|
MD5 | fe88c204013dc032a97966eff592913a |
|
BLAKE2b-256 | 084391b70e4e7d1a60ebb98724bed69d367577ffd4127592cf27728a75f62ecd |
Hashes for semsimian-0.2.5-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c59f72db9e0108c29ecc165961af30f822240dd0efb8b6d6e407fe9b8b059a6a |
|
MD5 | 9f01ced5470b2de0b38e3a9f6ffce502 |
|
BLAKE2b-256 | e0fd76bb5866482cc47665fa99c9caad03325dbdc8fabed15bb753e3f3bf7a73 |
Hashes for semsimian-0.2.5-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5082b5a9fdb926fc86e838c9ae6bb3b3ee4f663db5d0646e27260738a1c7a48c |
|
MD5 | e04a091808f809d0536ca03f69955f61 |
|
BLAKE2b-256 | 4e4c305ddf384cd6129b3547f2661cb6c9acf8674f76a7fc33d72b56026c297b |
Hashes for semsimian-0.2.5-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bbb68b05a864eff33e16be04980c6ee547bf307c87941fff02f8ff3af08777e |
|
MD5 | 211ea3154eca6bb657217155a2bee10e |
|
BLAKE2b-256 | ac62fd54d4f7880266b48100c2a99fab652e7d453bde66f071246fe9e8cd7c8c |
Hashes for semsimian-0.2.5-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ab7502ea9cc01035ca39accf273a15cd5624d67ed62233e3aeb3e13fdac6045 |
|
MD5 | b6191bf44e8663d379b228328ec81f46 |
|
BLAKE2b-256 | c2bdafea734c2466e58aa090c89cd2b10adb78275f091bb7a471f02785487c22 |
Hashes for semsimian-0.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0836b75185c5fac3707e1fcbc8426aac578458a3c455244d4eb209fea522a2a2 |
|
MD5 | 9cd7e573978fce12bbd46e5a440297de |
|
BLAKE2b-256 | 0564fbd658f24fad93636da63b0ef2c922e2cea89da5afcf034bf4ece84932a3 |
Hashes for semsimian-0.2.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 988e8cf107128bd47aa9364c225d3e1b8f30cf4e1ae39686cf93d63355006fbd |
|
MD5 | 937486d76730196b666522d53ab49275 |
|
BLAKE2b-256 | c763d3ccbf55a9c4aba6a853e697ba591921d01cab326de184c6335fe0812b44 |
Hashes for semsimian-0.2.5-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0517155dc10a6d374d18fb909efa94b0ba9dbf7ac39fbfde3c49dcd0c3aecfbc |
|
MD5 | 1ed31f04363a5999fa44d131beeafdb0 |
|
BLAKE2b-256 | 9c2b79a5de5f247b321ef5545ea51dea16edb163a63c16f7b0824ef2f2482228 |
Hashes for semsimian-0.2.5-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9c6e9ef420f8c0eef2b4d0e296ba39b427e825942e3ce3051515115e5614302 |
|
MD5 | f573131971e954e6aef1558da315161a |
|
BLAKE2b-256 | 7e431770ecb6bfd89c7bb26441584eefb900e09c51e4792e73b77841f0fe32b0 |
Hashes for semsimian-0.2.5-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a1299fcdc7b5f7edab321c78ec4907976af6d38031b6d4b36dd7b265ae0f3a0 |
|
MD5 | b07852e170d888077a85d87a67e5d32e |
|
BLAKE2b-256 | a1473fd4269b077a9df85b27f1fa3c78624a64f42394fe46f190357e2ade5902 |
Hashes for semsimian-0.2.5-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d449657312c7aac21384772f1c409da5b935c89db77f20887e82b8e617bbe059 |
|
MD5 | fae050dc9421cd901d76b890fdc16b95 |
|
BLAKE2b-256 | 9ddd09902b8d3da4f0df41529ab186187b6a90aeffef1ebf23c82257a5ba33fc |
Hashes for semsimian-0.2.5-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc1a0b3ca6697d2741073569bce2b010c1d72d4a146c9bba808cc5ba48b4a421 |
|
MD5 | e900a0a322822b65ab0d2abdc6d8eb6c |
|
BLAKE2b-256 | de770962846e677d66421510f0ce03181597d18779f682a1d6ae901913ffe215 |
Hashes for semsimian-0.2.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67dfe90dacef3e356f413368c336726c16ef6a538c7def60b03dbdb027fef14b |
|
MD5 | 518796f06d639b4fbdff98fe767eabe3 |
|
BLAKE2b-256 | 00b46a557e2c3be1c8a49c8731665974c01211f8d712248c67c13f916a83eca0 |
Hashes for semsimian-0.2.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b898828db880263492942a12c8418c33a77b60e506b9fb8417f2980de5e5d61 |
|
MD5 | aae96ba89e9c763d91308e633d30cc8d |
|
BLAKE2b-256 | a08887fb15efe4b05b4858dfa6200ae0233d6ef38a096c03c72151280756c95e |
Hashes for semsimian-0.2.5-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 540c6de922d19c5dd40263e74378feffdc7c8b0dabe381d47c026eebffe2938a |
|
MD5 | cf5075a6f4c841f2720e969861b0445a |
|
BLAKE2b-256 | 111e3a0c26a8ac7817aabb141bb22077b0118fea3689d592711c23b6d4cdf585 |
Hashes for semsimian-0.2.5-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43e464d32e22d2d91c29f13cd761154ce4c9996e00e093f6a0137ab034974eee |
|
MD5 | 56cc0c167501bcf62f1a92edc55a1a6e |
|
BLAKE2b-256 | 75ff826b5ea6f0f2b41364905fa50cfef01427b83e176a4543ef5bf9b46315dc |
Hashes for semsimian-0.2.5-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c664c08e86167ce1ccd42877801af27c792a65f4951272378757d13f26e74a7d |
|
MD5 | 019b729967e9ef79130a07bb0d138dd2 |
|
BLAKE2b-256 | f145cc80fbcf131281c164c495728a2429af45d22e4c2435160a6bcdc902320e |
Hashes for semsimian-0.2.5-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b7fa87936df07ad9983b6369a22168aef602c6692553e6d3a6fe4ab65892d6a |
|
MD5 | e9a5ec2d83b56891207226c62ed8fce3 |
|
BLAKE2b-256 | 7faf69b7c80ddd0d57a20e4f4518e14f97843011f1dcf56ce8931ec278f77472 |
Hashes for semsimian-0.2.5-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 071ab525eb81a858d9111522af4815e6c9b89a9650172da3ae04d8d1c00a690e |
|
MD5 | 4342cc03f678c9625a9adc821279fe47 |
|
BLAKE2b-256 | f49018fc6358dc29f9a70c900e397bb81db6181da789a9d0d0c092fbc49b6ad5 |
Hashes for semsimian-0.2.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4b068497cf4f6cd01f5ad97024baae6951ebbc806d71395c7aa04f70549462f |
|
MD5 | cdaa9a5d54ba9f5bf1d1e28b0cdcd224 |
|
BLAKE2b-256 | b28ccd90e052d7a133c4e28bc6b23559f5c863f423a2d18e9a62fbea2bef6895 |
Hashes for semsimian-0.2.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d1b22868db99d92b9985fa7ef948be4a15497bde2c30ca67a000ddb57d966ca |
|
MD5 | d658bb3c8dc1ffc469ed12f619d4bc6d |
|
BLAKE2b-256 | 9f76351a55513f439c6f9cb01906b0670cf9045c51819860608bc2fa57e352d4 |
Hashes for semsimian-0.2.5-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 970f6f8b764e86cd447725f988b51548b7ec38e495c281b0464c0f4bb4cfe39f |
|
MD5 | d40ab890483abc2ff70912fd1dd485da |
|
BLAKE2b-256 | 800831fca55f916614457505b373b8b3668210c4cae4d30f30fb037b8421b05a |
Hashes for semsimian-0.2.5-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69023e1974e1c08d29e6344f1e63de7fdf5aa10fb547199a3e3ca83e5a9a4df4 |
|
MD5 | 2620642d8c45095115cdd1ae1b5a06af |
|
BLAKE2b-256 | 52d86e74f1d370e1edb7a6abb38441a657730c4baf726a3376de8d1cb388544c |