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.11-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df2fa4274fad81492aca0d6b1b5094b5d69f093d4c3b7e53a357ab35c19bc406 |
|
MD5 | fe45bd332a984656595c2b14ed0f2159 |
|
BLAKE2b-256 | 97645b212cba98975547488e4c22e0f0cde4dc9e8d89b5ea3635e81f80f6ce89 |
Hashes for semsimian-0.2.11-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a45b5fbefa163f5bddecd599626f0a46eb2b78e1437da1e35f9dcc815f46dd14 |
|
MD5 | b47acd1bedd4d38c143c820028b276ad |
|
BLAKE2b-256 | cbd75cef987649409aee91e5eea346733fb75edc48d642bca48db1f88c8dbb9b |
Hashes for semsimian-0.2.11-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e13ec990b196ed3aafd6bd8abbf8ab704b2b189dcb10171259ec04bf4f0b261 |
|
MD5 | 2e5657fa0eca682b7c48b7856fb58638 |
|
BLAKE2b-256 | 3cddfcadacaf5d212c69bed72447cb67205fd3b33cf04c110620a314eb56a261 |
Hashes for semsimian-0.2.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 961d1f72f8b0bf24376522ab72d47633ce1f1a46141b7048ab0c1eaedd58c8f6 |
|
MD5 | aa6c5bf5a55d8bea2caa61af4207cf66 |
|
BLAKE2b-256 | e62bb299d379c537ce38b15b94ab8d9dea802e62e7cd00d119484fd7b3f1ffc7 |
Hashes for semsimian-0.2.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 817cf085f7643fb95bc165e6f3f4354cbb75097927c038aa804852c004aa45fd |
|
MD5 | 2040eb1b0b9d0a335f00fb0bedad9a38 |
|
BLAKE2b-256 | e8352e092c8efb715cc9da33d116e2feec62e9c5d50a26632c7b1ba17d40ff7b |
Hashes for semsimian-0.2.11-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ec8ef9eed833bd343940b507022011c490be2e56eb5d2d438ccbdd106d740ce |
|
MD5 | fed8f5444860117744f94cbc85c50918 |
|
BLAKE2b-256 | 88a2419b3e7704edac1f43b1716fdd45b1593d4ac9e329fd660e092154204534 |
Hashes for semsimian-0.2.11-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f65162dae4e7db1af92b8413e3c7529975778a1d1edf3fbdba7bf23a13296e0 |
|
MD5 | 7bdd14edda024698fd30dd25961a0d00 |
|
BLAKE2b-256 | 2d2e112a33bf5c081a6761c843e4627fd2660d840b44d4ed6a401d0253dc38c1 |
Hashes for semsimian-0.2.11-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b4730995a0a65e82559beee77c3a97ddf9512f51a9f944305b31d04a7b082a2 |
|
MD5 | ca276ee6998f6839f9779e661fe56596 |
|
BLAKE2b-256 | c7d5615e7f77ad1fcd2bd978c9f66a695236975ecd5e009cf0d23608272ca410 |
Hashes for semsimian-0.2.11-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06a04a2344daaf462b18869b79abb013b32757fe9ce3cbf7181fd186b96dac1 |
|
MD5 | 0b984a1a30c79e227d6163107d38fc52 |
|
BLAKE2b-256 | af71a4f881fdc8ea83cf39752244bddf0aa4b01b57f5b3f1bce0fcdf0c0783af |
Hashes for semsimian-0.2.11-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7750a28895f38dadeb8c8a515864fbf8fa1608a311a756e91f5f91de91319dc1 |
|
MD5 | 8d08417c33fe27bdb17bb7f9e2899f96 |
|
BLAKE2b-256 | a32dd52811c099c1d368087ecefa7e989e956181af709dab94a2d3c40d2e01ce |
Hashes for semsimian-0.2.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd3b379baef13060ac9ac1e44983b4c53cea3f4b2f79437375c504fd24b5d50d |
|
MD5 | fee85f101a03f21400ac37bdf347fdf5 |
|
BLAKE2b-256 | e673333b6503f36ad00b61b4599fbfa574c6d660051196aafa2324f3412b34be |
Hashes for semsimian-0.2.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5c2b2a64f794f492afa12d0ef9d0e448e3cef5263c08d30d1feea3eebd884a5 |
|
MD5 | 2989cf3c26142067cb2e7b51a4146eef |
|
BLAKE2b-256 | d402c24e0724ec3b7b8bf79ea2173de7925a5999b5fb4cc18302c35a4a91a39c |
Hashes for semsimian-0.2.11-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df4045092780e33f5fe0387554f7b71d90fc0b509de78d80ebea1d0cffa4afbc |
|
MD5 | fee807482d5731f85ac00d334ce0aeeb |
|
BLAKE2b-256 | 0d189f62fcb4c3cf4c4533a0714b9e8b8157ba5efb6574b7d75b62a48916f147 |
Hashes for semsimian-0.2.11-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a5d1bef1049da4c046154b01d285e1f9a276f0cbca146432b026a1b91899cf |
|
MD5 | 5e61275bc69aa14561c3f32e27ed7a98 |
|
BLAKE2b-256 | 5589b8656825869d79d396e0266ffee55b28713a56b85d1d21d21577c9dcbb4f |
Hashes for semsimian-0.2.11-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4cc029e1b353b4301d35d3fe449dc8ec214d8bd4f270ce83475933351438bc |
|
MD5 | 670d7a8399393d64cc89fb946922dd15 |
|
BLAKE2b-256 | e218ad949e11b5fd71fb68488ffc57b585736999f68267ce9ff5565621dc8bc5 |
Hashes for semsimian-0.2.11-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 766fe01dae2278d2dd832dd25a48e595d0cf741ce32a3d0f4e6617007d6a586f |
|
MD5 | 77e6d6cfe3416edc5ee2ae5c7f7007b4 |
|
BLAKE2b-256 | cf3df3346daa9c4d5672e971d54906b22375fbd741a2057d4ea1fd09f4aa5276 |
Hashes for semsimian-0.2.11-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61f82b9717cfe55be79bcd7dfd000700fde1a218e195d7c607710e18dcfefa4c |
|
MD5 | 15b676e2231a73d96afdb26e77c00056 |
|
BLAKE2b-256 | 8a7efa251b14bc3b8d8763913e57dcceae2084dcc23893cd8d39b59d874430da |
Hashes for semsimian-0.2.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39bec78011ddb991d91296e3ba59b22d8e4d03d2a2a239e5d3c3b5f325da6297 |
|
MD5 | 8ee829492976017485ea4d34e86ec27f |
|
BLAKE2b-256 | 888cf29ef0ead5226ae38cb306ff29f7e06375a501e6d17feb26347431fadfb6 |
Hashes for semsimian-0.2.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd4c7089334213ed5fd4bd67a0171757a7721b36047778d23147021f2e2c2436 |
|
MD5 | bb9d8d46b8c7d7bf45ddd13e026728de |
|
BLAKE2b-256 | d53bcb822f1b9f089d0d9ab7405c555bfccdcb73ed6947efffe4ba27a15ea4d9 |
Hashes for semsimian-0.2.11-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b0cf235e34e7f52c8eb0d545ef498bdd5185f6c137601e42ef7af0c6360a1c0 |
|
MD5 | 4eb72a0307c6496eae32a110a15ee439 |
|
BLAKE2b-256 | 52acdcbe581c5185a04a8a5834c93ee46264c0db51b163b2709efd2719a58364 |
Hashes for semsimian-0.2.11-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab194191e0f8ba0e2e0eab694a2a6153d245945d90e1ff154056e5f80aea38f9 |
|
MD5 | 57f8a2f44ea8c90992fa2e4309a0c20c |
|
BLAKE2b-256 | bd884aeb100e07be0eaaf245d5dee3b7b4a7b9fec0f4c25bf927d4edd52c6e32 |
Hashes for semsimian-0.2.11-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fdf160c1808a533633c0d84aca52049e6f601bedb236c45582190da391d3ff0 |
|
MD5 | f3b34ccfd8f7d072fdc74b284a210d23 |
|
BLAKE2b-256 | a308bbc9a622be38784710b36aa73b452fb97a05cc6c5da46a4e55ed7ac9b51b |
Hashes for semsimian-0.2.11-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f822b8f2c91e5a5137fc14eab833fc427faeee2fd29272a544541296b7279c28 |
|
MD5 | 98da5ac75d61103f32cda7027ce9a49c |
|
BLAKE2b-256 | e3a06842b738ddce4c06d686e33fee289a8363b44f441e3ad66f2543837a4b11 |
Hashes for semsimian-0.2.11-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdcf6144665c1519c63e4b47d3e4a2e25fe630286da44f421ee0d79ae2d85410 |
|
MD5 | 7741c024b47e212debf6f687ba62ecf4 |
|
BLAKE2b-256 | 96982fc362674eb05bc882702dc9a5ed18752e4f1ca35f121dde495a404d48d0 |
Hashes for semsimian-0.2.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57c8e49340b00cacc710b213b6a2d5f21bf24f8b64fc5bf1ed827db9726024dd |
|
MD5 | 0fd77ea737876a97f1c2c74876cd85e7 |
|
BLAKE2b-256 | 77f39d7b40aef6502f02fce3ca25f83fce434b14f6c45f099d09347efcade72e |
Hashes for semsimian-0.2.11-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7512fc3b82865d7ce76d1aba53687e40dfa81e678d2e95f70f303cbcf0356fa |
|
MD5 | 5a1cb0a27b098dac3f9c637e131fc1bd |
|
BLAKE2b-256 | f58fd7ecd6501023acc57b360afa0aa5bbad648678be760a37a2040fd617b840 |
Hashes for semsimian-0.2.11-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 709907e5136dfc41e0f2b7fc6374c89bf28952ffbac5f49b750957b39c8f06be |
|
MD5 | 4fb13b19df37ab07d04080d900973e34 |
|
BLAKE2b-256 | ee484f6b34bec304507455b6110b23221084d346311b79c9fefc0c5bd562826c |
Hashes for semsimian-0.2.11-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbfd1815e53835477344e4768a3caa14af01861d3618315d58feda2ce7520531 |
|
MD5 | d29b632e8331cf651e462c6e35a9bf8d |
|
BLAKE2b-256 | 08e91e2fc327e23ef07f3811c0e6c4bba4f16c63ef3b7cd5738d226b78e370be |
Hashes for semsimian-0.2.11-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6686dcc0da6324e6bea07bc95d5448dd0820f0a64d3013c5e71325506be2cfe9 |
|
MD5 | 709d1cc750b4ae7b54dbc7fea64c5045 |
|
BLAKE2b-256 | ccd7234c1e493e3cc8f1b9fb8a19c3a331808f8dc469fd738d302f26cd7e3076 |
Hashes for semsimian-0.2.11-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5612ddbaa18a0d406944c08940d432e3c86b06292c20f3e81f5ef379e9ecab0 |
|
MD5 | 68a151fec945ec1305485a240e839a66 |
|
BLAKE2b-256 | c2ee8126241540179f074656b5d875ab80fb9559599e60e7389d41da2f613945 |
Hashes for semsimian-0.2.11-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f405baf1ecd2240b39fa325c57e4f87a9a1f43fac55a5850f307edc1c6f55647 |
|
MD5 | fe509b3137c3545e5076e8691decdfd7 |
|
BLAKE2b-256 | e256161b308c8fdfc22db20f0dda8bca0fa7a65309cda2318e762f3214594281 |
Hashes for semsimian-0.2.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf92cc1ad21fe7e2c9d047481790f2910c722f5f476694116f51b93d3ce60e8d |
|
MD5 | c64c85921b3c44173fd3c22a1e3a6a7e |
|
BLAKE2b-256 | 88bd1b16cbd942dde36eb72c8e01d4df3c34ed5f8e047d7aff2100b84df1bec5 |
Hashes for semsimian-0.2.11-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e87de2dec9a1fd8a13bd8ccfb66067e6f11cae5c5b7ee6ecddc617688f843e3 |
|
MD5 | 033f19826c814e3a8b70bb520c0be6f3 |
|
BLAKE2b-256 | 80a18b9e9fd328520dc29e6872c412bcd530d2672c32bf62c25cf177acd41871 |
Hashes for semsimian-0.2.11-cp37-cp37m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96272b9ad6ff204cb4f1439b4e3602f926d344e09f578cebca40ff2d6cc7d114 |
|
MD5 | 397b05387c660bca5afeaa305c665b1d |
|
BLAKE2b-256 | 6f46394ceaf94931aa42fa9f46df3a8737127a750680fb9ae06ec9f56590e9e7 |
Hashes for semsimian-0.2.11-cp37-cp37m-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7305a26eaf529e28565b09f730000a9a91b3da23939c05e557efdacff6634b1 |
|
MD5 | 332483cb0a2c9b5f1f604aa8946af425 |
|
BLAKE2b-256 | 4128e2d16025222643514186c98985a5b35505c60d54544f33b91cdfdf4bf78e |