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.5rc1-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38276ada87dde7cd62c5e62e75105dec2078e43e289ab499649fc16521e073ea |
|
MD5 | d99f2356c0a3db32b93f56ba41917ea3 |
|
BLAKE2b-256 | e2917ca69d3afe870072703121415fc45646f200998bf67f52cf7851ee3716f5 |
Hashes for semsimian-0.2.5rc1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee0967b969ad4adc32aac110b62025ecac3094c48565aff1c67cd9a4681a5735 |
|
MD5 | deacb8bd6a60ff5bdd27a13ca5a93355 |
|
BLAKE2b-256 | b495c970a0b066f10ad83a8e3f6f26df680a2f6d21e833a3ac3d94ac0f529029 |
Hashes for semsimian-0.2.5rc1-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fd4dc98bc7bd5a5b07b81576bdffea85185ff088293f7674e8f26b7a847bd3c |
|
MD5 | f0a7f66530a3a8ae2dfa8d6d2d9d5d55 |
|
BLAKE2b-256 | fbf00308bba75254d827cdbad576d7cacecdaaf8617a81859ab35a1eb8842012 |
Hashes for semsimian-0.2.5rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2274cc2c9a3c7f4f20f3c42d5106045e4e15ef290c840e348b14768e1d99531e |
|
MD5 | 405922b443cfbb6f7ba877da4325784b |
|
BLAKE2b-256 | 36d069853be7ec6dd5c38be5ade5c32cdd64bb7caa6115ab4ebc594703579bca |
Hashes for semsimian-0.2.5rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88aa0095b1cd158e4c8a6d0f24083a7e319ae2869f15846955a3382551b7a3ea |
|
MD5 | a217c161e45eaa9b621528d26f4072f4 |
|
BLAKE2b-256 | 69915115e4381fa20030d69c23f30cc19c227a1f6de2e04115d6fe00e9dc45ec |
Hashes for semsimian-0.2.5rc1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d187e947e92b852689fab683c05c1e358d07643897398bff74f02688171fb141 |
|
MD5 | a599e89bfd2fee3ded799b6c8ce6c04c |
|
BLAKE2b-256 | 408b7d1862b7251f7cf8fcbae47dedc5e132629f111046996baeaea19ebea8ed |
Hashes for semsimian-0.2.5rc1-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a640c096afdad3a807fb6fd1bf64752c5e5d35e3756b984b615922cfdbc932 |
|
MD5 | 9acfb34a0b8c63a3c503488ce77a5a94 |
|
BLAKE2b-256 | e522d2b02251e6128866471956d6eefb0246a1c07bd44f0d0adb687472a87397 |
Hashes for semsimian-0.2.5rc1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4964ac912c908b54738f629883f446784b0c52d10c404bb9d611beae25ee783c |
|
MD5 | 42cfbfe218139b1268a4e01d55970634 |
|
BLAKE2b-256 | 8bccbbb20e4523e30ce30c689505d908417329131c7b6b0122cacd17397155c1 |
Hashes for semsimian-0.2.5rc1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd39fcb3503ae5a69d4116b4af97f34d02e7e3298a42a0038a2599a7a2a54e9b |
|
MD5 | 711ad9948bcdb6fea29ab7d97b30417c |
|
BLAKE2b-256 | abd79bdbaae4cfa472a0e4b9bbe4a7d735d931c7a7d73b5270dfe13d36118d7c |
Hashes for semsimian-0.2.5rc1-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6f4963a8a214e0b7a6c2a09a4f7145533e219d531da2bbc7496925df31ca102 |
|
MD5 | c2becab9974b73ef33570c490eefbc2a |
|
BLAKE2b-256 | 9e641f6a6744c5be405b736810be15362ea19fc22e16bfae97fd310d7c9467de |
Hashes for semsimian-0.2.5rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 252418349baabefdfbc72d0172e235bf2eb29adef0108fe821da5467e97c756a |
|
MD5 | 330fd2d9c56e1e892dda89a865a7fbc9 |
|
BLAKE2b-256 | 94a73e8b23eda7a3c66fe6da9bde1523d5d7b06bf171e502b8d20f484d2568c4 |
Hashes for semsimian-0.2.5rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db7ef93cbb9bd5cbe055715015fd57a6b6077855df69319451b03e2500cc1397 |
|
MD5 | eb5a2f3ec707cc0bc590dc9b67fd4d63 |
|
BLAKE2b-256 | eaac6b194c882eef7c5aebef7de2b90e615bb438efd175e43165958a48e88a1c |
Hashes for semsimian-0.2.5rc1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d763af60d9e02b4c4b44d8c6b28cd6a227cc3015a14cf7ce4fddd4f32cb052cc |
|
MD5 | e8d3d780da1ada1d06c4e9cf138571b4 |
|
BLAKE2b-256 | 1bf8c09271ec45abde84cc4033faaae97d76c6edf661983e8a9056e9ad36c3ae |
Hashes for semsimian-0.2.5rc1-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 478f5805f74f68236b5a3a3ed058953cebd4ae2cd059faf2f3c6d2be9ceffd99 |
|
MD5 | a200d02dd0288e1276e5892b6cd34327 |
|
BLAKE2b-256 | a6d0e4ae486508a7a7b3862d923dcdbe24c3203fe219e4c846badca3e6cb4593 |
Hashes for semsimian-0.2.5rc1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f40423a919dfd866701d60996a74fd4ef9f2d9939ab820fae0e0780e4658994 |
|
MD5 | f85bb73236ba9f304726828c0e828e46 |
|
BLAKE2b-256 | be43ffbfeadc33bcbdc7e9e7ff301288252bf5af0666fafe5bbbd2801c469af3 |
Hashes for semsimian-0.2.5rc1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7c5814abf967adef6f3c4a20ce903e0ec0a156b101f9acf61b7fd534db2c573 |
|
MD5 | 20361ad3cb439cfc29e8c943a6e9ad74 |
|
BLAKE2b-256 | 385a6bb23c927890c43f89b9223ccc16fb9130679e6042300e6a7af6b1679271 |
Hashes for semsimian-0.2.5rc1-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4286cb82e311f356322c18088692b2e4deb0f8d6b1ef7c1df78b11e650ad9d7 |
|
MD5 | 80466467794c9f26ff333b04f61608fb |
|
BLAKE2b-256 | 5af786ed48828026c787db1921780c4b3b382c4fd149e504be5e354d229b774e |
Hashes for semsimian-0.2.5rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1323f3c32549c1b3d25506dfeaed12d79d1a41b734cda37a0f051fa1fc53e332 |
|
MD5 | a5bdcfa407a04ce7cf2928d978d09fa0 |
|
BLAKE2b-256 | d8a6d788a47ec2191766ea69dbca3e3d0d096315d64706935b5f8b58d8c7764c |
Hashes for semsimian-0.2.5rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a4bf88547fee01a58b1dfa581770f4670695ad30996c50fea7b8351b8ef1b30 |
|
MD5 | 9cf2b1190ec02dd4de98f1aa30e91b39 |
|
BLAKE2b-256 | a45557d8f07d3b5aee40055eaf0517465028536ee192732bd49527e920d23d6c |
Hashes for semsimian-0.2.5rc1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b30a09ce9541aff55b2834931fe67714a6c8f780d0f4dd63d907e3eee4ed910 |
|
MD5 | 59f6fd86d825d3d4f7ec774c52e4a18e |
|
BLAKE2b-256 | 79352be3a4b8b8c34d6cbd87b0e48a379b0c5f1a414e73647212344d5526c5c1 |
Hashes for semsimian-0.2.5rc1-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18a0ea3c7a0f6aab9a10016ddc4de5870d1516f03f8ba0805daa30b7858f374e |
|
MD5 | f5844cdd8786583df383deb788398bf7 |
|
BLAKE2b-256 | dd24b28f97a1fe089b089e5b67d49e8f00e2795a837ef8faf5b02d70d5da2d1f |
Hashes for semsimian-0.2.5rc1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e21b9b0f18665a9d34322ad5c3217740565475040b96dce5792fe3f202f2da6 |
|
MD5 | 3e529d71f723eebcfb90bd522dd2dd9e |
|
BLAKE2b-256 | f4adeafd98404a372e1c3bcd9e9a866aee2f03df0ee6690f2fbb3dc7ac765f56 |
Hashes for semsimian-0.2.5rc1-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0f645a1f8655cd29b927f5e666763b81795664a4f8db4ffece261ffd465bced |
|
MD5 | d2c2b34a337e731357c15d5b5a4b33ed |
|
BLAKE2b-256 | 281dee32f10a6ffa1d6dab828fcc5b2f5184adb164c006c78a57426863bb0186 |
Hashes for semsimian-0.2.5rc1-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd4008076f30be1f609b22745550ab6bbf5ea6359a24d31c56c52b9f608c8330 |
|
MD5 | d133d015e0a270aba94b9888f637aa53 |
|
BLAKE2b-256 | 399008471291828b6fd32e3429877f8b727330665f9cf991bb930d5090776bf3 |
Hashes for semsimian-0.2.5rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce3c8a8b85e273a39d7120d52bb8ec9a81813de932dcc97a7fcb48af8f4241bc |
|
MD5 | bf9bc9d8e0ada036153e0a738b5a9e38 |
|
BLAKE2b-256 | 205f0b52f3cb547707cd1d80d9af572aaf20a2398c1cb20651e49723016d91a7 |
Hashes for semsimian-0.2.5rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80b1572e0e62bfa60f5b70711e4b91a105bf51641a964283209c500cd210eda6 |
|
MD5 | 09afc0c2e5d575bebda9f7375e075d42 |
|
BLAKE2b-256 | 6a861ffa0bbf11ef8a9a847510a0ed31aba0d8c453d2f9ece6723e33932b0c9d |
Hashes for semsimian-0.2.5rc1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07b9afeee283e50522e5f9506974b489a13110b544103a6b26c77584e3ac0fbc |
|
MD5 | e37d9af548a09ec52ad2efbea5a6a394 |
|
BLAKE2b-256 | 1080859b360e2e39a37aa0a7faf01f2512cdef69ce11575aec4080e1140ab0d0 |
Hashes for semsimian-0.2.5rc1-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c63c2cbdfde3dd28c9a3ce7dfc903d99369a2337cd853e11fea3a170f1644ee1 |
|
MD5 | 83249040cca7f91815088a6d325994f3 |
|
BLAKE2b-256 | 6098f44779dbefc0121c4dbdf748076470c7fe6c42547c1aeccfae0615303036 |
Hashes for semsimian-0.2.5rc1-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3e008185c9a69b5eabb2d9fe7a1c22d6d60daea27d14dc80e15f0aef96662e8 |
|
MD5 | 0cddd031a48fe295e05165a3cea11ea2 |
|
BLAKE2b-256 | f50e3e1ac1c365bfb3ef72a7da8f0bbfbab6e75256cb4446f74d4a5050617c00 |
Hashes for semsimian-0.2.5rc1-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f77024cbb528f558f30d1cf835cce6ee66f5e1170f4d86d47dbeccb8b4204ca8 |
|
MD5 | cf1b82e9e5f0ba187e4b1f37cef01998 |
|
BLAKE2b-256 | e24f119309ea8b7998251ea11b019d248bd68a1879a02cc338dcd89d19120628 |
Hashes for semsimian-0.2.5rc1-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00981be5b33ade81648a3d5168c29852968afd0548095f0e51e9baaae42686e9 |
|
MD5 | 1b5a4af3fd117c78b2092b20b241691a |
|
BLAKE2b-256 | 32ff75cd8f894ef78eca98474b4be8bdd97c6a11f861f00df8817affc09f5afa |
Hashes for semsimian-0.2.5rc1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ea515e1fa76927db6556653e2003389c516339d87a7d41f9d2b644509d80295 |
|
MD5 | 9e84d61153bb5fa5ff0dfb777545d8ab |
|
BLAKE2b-256 | 49a30a86037717dee7814bc1646959ba637a723836aebdfbc7ad79410ace4032 |
Hashes for semsimian-0.2.5rc1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 949061eb6fcba68328a21d9c35622666f0d4e763a12d446b1a2242ce6b90e44d |
|
MD5 | c1ff33d5d547aff8cc9c82e04318c029 |
|
BLAKE2b-256 | e5bacde3d9aa3bc3a58b86a464682540eb44b1554ec1dbfc740998ed7dc0011d |
Hashes for semsimian-0.2.5rc1-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dd79b3551eeef660f94739bce69c3e633b1a60983114ca79f6bbe4369b8121b |
|
MD5 | c086cbb502f241424dc06f82b28378d8 |
|
BLAKE2b-256 | e8d52fb591d9127d1521dfcf0efbd7a8b19a2ab6dbcef6c8f26c8a22bb002834 |
Hashes for semsimian-0.2.5rc1-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac418346d072d6d2bb48de5a24753fb0ed2d4b63269f430220c94d0361c94c9d |
|
MD5 | a5832b39339ee74ebdabf32ad2406d7c |
|
BLAKE2b-256 | 986ecce223683581b573226c72fcc21a62050a0264c2d7e652a37d8c5face556 |