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.5rc2-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3af75a939c3345ae6224ef696d262d4804fa031a64ac86df06711f3bca67831 |
|
MD5 | d185a1cb25b11e28895dbbd214f12f2d |
|
BLAKE2b-256 | 6d43a2ae516e5457b2307ba7a7e263fd2457145263505d1c5a0d195bad237482 |
Hashes for semsimian-0.2.5rc2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda07e8598cb5bd9717bfe3843ef6a2a53c2372326e84ec8e6265e4a659d27df |
|
MD5 | 0e19ea492b77b815a0055543de6f297a |
|
BLAKE2b-256 | 652bb778d8211f22a1d73140f87b6a6232e965ce060b7b2bb8879a4ca8071e77 |
Hashes for semsimian-0.2.5rc2-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7797f2357c3944a7f981afba7ada0844584df32083a64093a2111f0b22d2db1d |
|
MD5 | 580e9f86e26a9d902c4b4dcfdee32664 |
|
BLAKE2b-256 | 266b0f433fcf3366237a236241eb7fed48e5cd83ac274dc9f1232c2f02d6562c |
Hashes for semsimian-0.2.5rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388901d3c30d7fbb750b3623a6e50637c9f1acc379b62c3145532da3b4b936d6 |
|
MD5 | 81efd84e92d5acf0f7126c1c0794ab0c |
|
BLAKE2b-256 | 057f57eb7f69aac87aac34a9a759fbcd42dcc073ae0b6f349fe266da8078d57b |
Hashes for semsimian-0.2.5rc2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec1c494ce0f536d52496a29f1c0bf19bd1f6a3d2440e5dc6546fe4e4ff2facee |
|
MD5 | cf5708d4154d04335b2d566b22c894dc |
|
BLAKE2b-256 | 3a58d5640eb0b0b0e8e1780a084b3cb57aef992c10bbf483bbcd8e74a7a3d266 |
Hashes for semsimian-0.2.5rc2-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d1b515540190504696bf25486b5acd61753a3ea6b46bd743563861d9ec57472 |
|
MD5 | 3178ccd67fa54a74031a3fa1c36c0daf |
|
BLAKE2b-256 | e5358d35a41bf00b09e29772a77c1bd899ffb5bcc4b46068dd81b77764331673 |
Hashes for semsimian-0.2.5rc2-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b1c4f57d7b31050ce890d3f31d748c9c1a5dcd1f317e2a297287e6e0e1a7a12 |
|
MD5 | edb193d9f038b9dfcb8b390d1bb84003 |
|
BLAKE2b-256 | f3774acc373d41736eeeeb560c84f8fa64c92bcdeb33466c0a5152da60eef4f2 |
Hashes for semsimian-0.2.5rc2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccc7f291f49d67a2fb137ca82ee0b0bf008617eceb86740d20df4eccaaed572d |
|
MD5 | 959e4e51f1dec03586a389053135786c |
|
BLAKE2b-256 | 986c80efa0c7a9a5d65b76733a28682319c2a982753f9930c07f8aada4af8526 |
Hashes for semsimian-0.2.5rc2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c51f5fa5eda4913a563719f7ce7d1a6593a20cf8727dfbe33a672a3e8b0b8cea |
|
MD5 | 10a123ea8f6fd788c04388f016ad619a |
|
BLAKE2b-256 | a8840aad977b22e585ec87951c2d144706cfbc714ffa099fc4dfd8c0bda77874 |
Hashes for semsimian-0.2.5rc2-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dc311521c3033a4184dc0a9657a1de588b4d2fa50461aed70c6e5793c89c2e3 |
|
MD5 | 5f137b8a86f58042c3c2b9ffbb21ac66 |
|
BLAKE2b-256 | 9f9d5d6b64acc0ab6bcf7dbbab7f0870fc6f1a1c2e963ac955203feef29f3629 |
Hashes for semsimian-0.2.5rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90f464eb2cac4d832eae1d9534effbb0481b83fbc09cbc1aa34f503cebb767f6 |
|
MD5 | 8ea327a3ba3153e31c6f395ed98b2555 |
|
BLAKE2b-256 | f28c61780cb448f97c9674d79f6198782542b487512aec287f52606650ad289e |
Hashes for semsimian-0.2.5rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62b0281f1b63b1defb4bf331d227c96f958b438bd5ef7d73137980f1c7a75c00 |
|
MD5 | 31957e9a51b1556e4624958d975b59af |
|
BLAKE2b-256 | fd9cc1c373fffd55346a1410141c149aca1a799b5158b835aa5ec0aa96d74406 |
Hashes for semsimian-0.2.5rc2-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be553485de97de577d0bf4a4a9fe5f519fdbe7ba4499653d34e7ad38b5079a67 |
|
MD5 | 29da297281d4fb38bc90086854b211d7 |
|
BLAKE2b-256 | 5f54e56d3c5ccab6f701a3f97adf85460004b0cbeb16582f1e122dbb4b8ddf50 |
Hashes for semsimian-0.2.5rc2-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df09324f81bb329d64c2e13e2f5a819528062ae185dbf4fb63db69c59e77e00a |
|
MD5 | c6e2a14d1c99cc5001734b7805a67103 |
|
BLAKE2b-256 | 31f541975d254aff7d56511fe69e223bced5808fb47429d375a4b1b371256ffe |
Hashes for semsimian-0.2.5rc2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbea58b060f3c99020a2f2d4a572dd631c9266946326f51da58a09d986344a54 |
|
MD5 | 003341ec2a687c0665f7ef437d0c3ab5 |
|
BLAKE2b-256 | 81ee16fce9872eb849934b41944d6b09d0071f3e00521cf3a574896d6e1fb7d6 |
Hashes for semsimian-0.2.5rc2-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 378654617488535b77424dee410f77724d92c0df2b434c577436e553064eac79 |
|
MD5 | ccaa22f26a78d60cd545bf67f99b371c |
|
BLAKE2b-256 | c0f0af4d33fbd685c2fa81c7dcdb2867a82ec6f7f390a7f7ea5e1e36641b9a14 |
Hashes for semsimian-0.2.5rc2-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f03b7a99952e552013706a748fb568b75252627749a15df05f8c0d1266f26e1 |
|
MD5 | 711ad8b460dc96ab9ac895be3effd7d4 |
|
BLAKE2b-256 | c847fb3f7f55df9ea2c156567775a480236667ef64e7cb6f98741cf8720ccb06 |
Hashes for semsimian-0.2.5rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62ec73a4e4f0723a3950c310045c68da9dc22db91d0cced69715eedc89898eb |
|
MD5 | d4c9526f22a73153901ebc8ea9cc4c34 |
|
BLAKE2b-256 | 2d3d35307fcef7e9ce5d7f364d17b74b8889ad19433ab0c9b0af3fbf64c3b446 |
Hashes for semsimian-0.2.5rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2c30c0992bd9840aadbd3ff69f53fcd6933a640774152276b0074cc9461abf8 |
|
MD5 | 648a10f859592b4ab76c98f5fcae3e88 |
|
BLAKE2b-256 | e6db5b25c7a3af93dd86401f0826d7afa171c95fe5caa6033aec391e6c0df73e |
Hashes for semsimian-0.2.5rc2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d98c4825f24964e908df13063272c9b32a96a5b481185614897d89458b0428b4 |
|
MD5 | 14ed4df51ce834f32ff3aec96758f523 |
|
BLAKE2b-256 | e7f35475a9a873d93e88c8cca660053cbdb11d84fcee53eb31b821a9ac09c6be |
Hashes for semsimian-0.2.5rc2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5129254c009a19ba48d5575925ac4e34c93fdce9eddc9d0650279d4ba020a202 |
|
MD5 | 71c8252f4e84e5bd100489ebd560bf84 |
|
BLAKE2b-256 | 7fa5bcd6a7c9d630eb28c9003db62d8f3554bde1be64f1773a677a8b4b62c315 |
Hashes for semsimian-0.2.5rc2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5cc62e33dab7f24ed926982a82b5aa5f90ee93fd10e7626c852d822f7837ec6 |
|
MD5 | 955c008902c3b085bc4245a59307cda5 |
|
BLAKE2b-256 | 78f7b1d28961ee1e6982d4f652b97fcd64320b9764254431a3addcfa2251e842 |
Hashes for semsimian-0.2.5rc2-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 869420e6b00ca81e79d9cddc30eb61c37ddc5f35ba47103dd22d5f35a2a4c4df |
|
MD5 | 1da5144face835943085a282a95c2871 |
|
BLAKE2b-256 | 3f923ad9a6752fa9cff982ca12f25614d6cafa61c3623166147a554e3bc8c0d5 |
Hashes for semsimian-0.2.5rc2-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 181c682a6a2773edbea6905385a2cd2c0e4c86e46056911177575270eb4acc27 |
|
MD5 | 960c9e5e31f3fe30b90993274af6bc63 |
|
BLAKE2b-256 | 4c54bb8344e06a7184f081d33f61ed31f1eae91e47b920267d68c6aeb6438ca1 |
Hashes for semsimian-0.2.5rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 009e01709c6472765edd56a3dde4325ce8952f54d4e11e7efa65a282717c5153 |
|
MD5 | 75cc2699667755b3d955b92484f547d5 |
|
BLAKE2b-256 | 0cc9c8b7247e32594bc2f1e498cc1b478511b2195a2bb9790886543128552c11 |
Hashes for semsimian-0.2.5rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60dbb8041a7c9b8132594badc5f878a5e4945b980957760164b89ba69ca41447 |
|
MD5 | 4456a2c8bac7cf40960e89a19d94ce33 |
|
BLAKE2b-256 | 0e794fc0d81902a64675a0549e700f16de61ebd493c5e0753dec6d39ee3ce5ef |
Hashes for semsimian-0.2.5rc2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2a4a8e81f5a05bba3a8c4a2254d5a52781156f702389e1af12389293c4e38a4 |
|
MD5 | 326e6d8029ef66c590e5c55647945ef7 |
|
BLAKE2b-256 | 664fcfa64bb511ddf6c6cd280a85911fa69def4bad6ca2c7e5184370109a233d |
Hashes for semsimian-0.2.5rc2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99fa059318093b20bb4eeca99a5e331ebc164cf6121a0e63660b6e93d782b040 |
|
MD5 | 07dc4963d2b03675e26e6d866226bfd5 |
|
BLAKE2b-256 | 9d138a8abeb07cd8d37105364f86aca6b1f1c9a189df7a4c04323d59966283ea |
Hashes for semsimian-0.2.5rc2-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b88adcdff427d14c0ef49fc0e2666b4f2906fd813cba5a6ead0d766aeecdb79b |
|
MD5 | f417170a6f2aad5a04fe9dd1cef86474 |
|
BLAKE2b-256 | 3063bcc504c6f05cefd5cc7551e9f27e87b690af4c2b166ef53f1d6e69dd0ba3 |
Hashes for semsimian-0.2.5rc2-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48bbada3d97cd7ea41701a2701fc292550aeffe22cd721537208268c9f7ca809 |
|
MD5 | ec94ad1282e516b0028f96857d26a0b3 |
|
BLAKE2b-256 | b532ae37b787ed581ddbcb128d4d10176fd2ec8f6956fbb571a7d89449e6a465 |
Hashes for semsimian-0.2.5rc2-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aef9cdf89b803267209d492943a4e3e8e3d03fa05612ce7ab61bcf4f61d8088f |
|
MD5 | 4359b686666b86fe202779d22e0b51de |
|
BLAKE2b-256 | 4442d0dfbb13d2463be35e6c4a71d3a933e0f24cef3373c5f52ab0d0d3fea376 |
Hashes for semsimian-0.2.5rc2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08185e836b6b2cfc4214dbe944aae2f7ca20c68cd7afb4cd90f42e0fc9c94a71 |
|
MD5 | 1cd3475572eddbed7f896cb1e7afdbaa |
|
BLAKE2b-256 | 822fbc2bdd020fbdd8a7d59c674cceda2d0ed2f28449c13849301a0596f3c15b |
Hashes for semsimian-0.2.5rc2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4560c7b223384b7f3ce62c278dff2802f28615fb08b181b178a8ede0f5872737 |
|
MD5 | e91b31e7c3e129ca30f8435e27e8a326 |
|
BLAKE2b-256 | cbca5960c03795e75c425d9d329256fa4d636048e32269e5e65a8c6da39079ff |
Hashes for semsimian-0.2.5rc2-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0c3f4c799ab769c7a5fd68643b0e7f4e8f2b6c3ffcbbe0f314881bcad04539f |
|
MD5 | 3915d54e7e94860ffce1e017ec56daf8 |
|
BLAKE2b-256 | 56010ed700331bd767d0b15061fd2fa2a22d32cde4900b31d5d2186262922063 |
Hashes for semsimian-0.2.5rc2-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a39a05ccebcbd5b3096512ffc43ca5f79bea9d5abb7a171c23e1bca0bae83e3 |
|
MD5 | fe701747ef9bff3cd8093edaaa5aaead |
|
BLAKE2b-256 | 94007a49522de9d07e2f578a784aaf6ea16ba3b0095f980f1b3ab5d7059cfee9 |