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.9-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5669d1fa3802324366818022626c68b14bebb02962fdd816cfce86a0bbb2115f |
|
MD5 | bc9dfeab6bb6ccd7f54ff6e6ec6fae3c |
|
BLAKE2b-256 | 453d2af2a92837287b36b5e70194ef1960bf38b48df058aec2dbb1df9ffa3bea |
Hashes for semsimian-0.2.9-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5efee464b078b3fa579f1c73d66eeaa38358b3c27080df1288893bcf6281fc61 |
|
MD5 | 8dc932c4a582d2c4a2ee193539d43a5a |
|
BLAKE2b-256 | 7722e722c4d53ebaf1e001222a2029bc9f31da700608d638a2b4df94dc927d84 |
Hashes for semsimian-0.2.9-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8516e8aec50505ce3acc3433301871871d64378d66b1e25dc2e7beffc474df7 |
|
MD5 | 15d097d023eba321290abeffe30dc8ae |
|
BLAKE2b-256 | 243d625dc93a1be91ea831a0f8f86aa983b6398870dbbc6c12e41c791972c8e4 |
Hashes for semsimian-0.2.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5820bb01d2d101737ef3776b341e31dd3ff58652fd97223528560cffd4575a9 |
|
MD5 | a946384f2e89945fa83926264576013b |
|
BLAKE2b-256 | c33b7f2d681c346d3c86b7490ec929900b0fb042e089cdf99e360eecab20ac26 |
Hashes for semsimian-0.2.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388b715d383e02ede7c947534e57a1a7cfef8d9efafd23e8fbfd0a9bfc7511ad |
|
MD5 | a94d2d6b315681b69bd30f5cfb9d5173 |
|
BLAKE2b-256 | b65041c1fb3b307f8cd7a3c3a49e7a9911ca3e0e1d79ce486b96758d6f0be24f |
Hashes for semsimian-0.2.9-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b55f64a3ae8c09275c94b1aa3b336fa42fb8b4bb228ecc969d4681b6bd74382 |
|
MD5 | f5e0dd4155de347b06111aa5c2795f32 |
|
BLAKE2b-256 | 96074a0053673aa1b7e7294e578ba35da95e6ca56f23bdd3bacfd4fea96a60d6 |
Hashes for semsimian-0.2.9-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d59a1401292dc165b8c188804ff3b5d9879a47323e38f35917f66722b0d08413 |
|
MD5 | 7442e5239f2c0b418bc06585cc1fb929 |
|
BLAKE2b-256 | f63cf0d7bfaf06a695d58cd8fefef34203f33a712ed773022ea09607b23860b6 |
Hashes for semsimian-0.2.9-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 197c0f8707c9b539c583b592d50efd9b16ecb2d799eeb8051b15d8cdac76e038 |
|
MD5 | 89a17f8126527718ade138f3127749fe |
|
BLAKE2b-256 | 3e1c52620b4d7fd40af383688dfd538a082ad30fe9cf8aba7d8afdc0474a1559 |
Hashes for semsimian-0.2.9-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 490ed272dfce74572f8b22c78a0c60c875aec965f6d07b17574373d20f328138 |
|
MD5 | 34d64d0c2f35e3c64aa7b2e9e3ddd5f2 |
|
BLAKE2b-256 | d22e1b297770aa8777fde62aae1ab582e0620a4364692df0e1a63282db71a22c |
Hashes for semsimian-0.2.9-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ec0bfe56dde5283552386bbad223396830dc65fc58d90db4e0b9b711c58e2df |
|
MD5 | e000b3e92b07f2445ef61c3ac9a9c567 |
|
BLAKE2b-256 | 1f070267424565ceeea007be8b4c4ee047d35959d438e566ea036c136517246b |
Hashes for semsimian-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4df83766e7c3b93aac00611c09499008a40042cffc565644da902e6166754574 |
|
MD5 | dcfc5853d50be30d74c1a9f1939c7d3d |
|
BLAKE2b-256 | 3e8228fa1141371cc0b166b4c8c81c18c17e37fe26febed0b6e8e2cefbee1fd6 |
Hashes for semsimian-0.2.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3c0ac356578e12f869517e0b8194f4e92b6e4ce3b7bc5c928372f7c03dc6282 |
|
MD5 | 667cf15353a24d1b4a20feee782814cc |
|
BLAKE2b-256 | 0e53feaf6483b73654d794580f5b0be44ee3da5f91cd3efb4e1f55543a5f0b50 |
Hashes for semsimian-0.2.9-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8af7c18c31e736448afbe73ba8d39c97f17eb013812c6db0f2939634e975c2d8 |
|
MD5 | c007e758030d99c75f63c48c90347a2c |
|
BLAKE2b-256 | 147b5e90bc3c4cd23f7c53bd3f5ddba5f39fbc26bc2cce4ad00407fb9ff3bc18 |
Hashes for semsimian-0.2.9-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e164bec4a223366295908c7426489c808b8a0ee98309903ada808c9ec803861 |
|
MD5 | 91a2719c598216e23173dcc65a012d67 |
|
BLAKE2b-256 | 3e0bd665c4980ca76f6da51c99dd4cdf38e7e8ea05c5de99f55d17b70859ade4 |
Hashes for semsimian-0.2.9-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae0e6eb302cc473174ab71587089f9e059ea2a82a58383827efb4635770726b |
|
MD5 | cb9b0829176705faa9e10ed7d0551253 |
|
BLAKE2b-256 | f8cc73f39480cee9087d179afb3deb7816e1c4bc417a5318e99731f80bb0485f |
Hashes for semsimian-0.2.9-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d598ee0d33b89e8812a088afe2541505d31eae7eb07ddefe81e46c86d651c857 |
|
MD5 | e0199124f6bde44dc1960eba99d3062a |
|
BLAKE2b-256 | e101ce2103436cbe8d67dd5e0033614495dc997cfb9dcb88da760fef0459e038 |
Hashes for semsimian-0.2.9-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72273eb880a7d27bdc2c5fec9abe49722b56c8855d6c93da39786e303ef3a8b9 |
|
MD5 | 7521ff23626fcd75a004d5a8d9528d72 |
|
BLAKE2b-256 | a9e8e47aab5619cd9b42fd35c350c1c44b9a20f90db7dee9d282cd591c723d9a |
Hashes for semsimian-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 242c755b00a7086fed39f3439bc15fb61790645130f94aba13c0c8919321734b |
|
MD5 | 84da90270e28d7d20e6fb18ea78d62a8 |
|
BLAKE2b-256 | 96ab903b148078024b009bc909c44d3a8082ce0d158c4358ed2ea43737fb97eb |
Hashes for semsimian-0.2.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | faaddcf0061c62c58c482a31aca7b10d7ef6e9b4c1a5fc348467b5fd4b4a8f89 |
|
MD5 | 0ee567724c38baf07fea3dac1af3d477 |
|
BLAKE2b-256 | 32e2f79fd24d5d51f625528cb195a6ff39394f786a1ec928c589a00a4e131626 |
Hashes for semsimian-0.2.9-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a3c9d8f4aed79320635033d080e3f9b80ee05f46e478e1c6b067f69bf1928c7 |
|
MD5 | 8df4767d3ad6e1ec8280227d278e56e2 |
|
BLAKE2b-256 | 0a9494adb3624693d3be32506d5dc634e967a156123567003e454db01d5559cf |
Hashes for semsimian-0.2.9-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 153cb6c3925ed74e4d01fb08304c5ba4d6716f29ba2812955e2e37d0223738d3 |
|
MD5 | 2e52cffab2d5d08dbeef5a62d752cd1e |
|
BLAKE2b-256 | cc0528b1e1fba1248d0032bea84f7d0f8df1798da477c127c57493ea9f40d265 |
Hashes for semsimian-0.2.9-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee60336caec47d21617696eafe4156bde9c1d3c38f9a699859925032501cbee7 |
|
MD5 | 3f8127d6a3556fd3677bd89b2fe7870b |
|
BLAKE2b-256 | 39f72c5243a947cbef1735776ebd506ae88c8a52e782e6f1abbb743c1640d14f |
Hashes for semsimian-0.2.9-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94572663f21066d1385f96bbb6e7e90bfef734a0929c73e24ba949fed3848355 |
|
MD5 | 0c144f168df96b1dbfaf0ffcd81ac8f8 |
|
BLAKE2b-256 | 2116693a384d89fa7a6ccc2b9fc5e2d8eb2023c802eff48f88696891a702023c |
Hashes for semsimian-0.2.9-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91a3bfc98b202aa7a3d578bbffa1acb8f401a4bfcd8124a7e56dab16b4b48232 |
|
MD5 | bd50c743729dad4fa978d54965eee1df |
|
BLAKE2b-256 | 68ef7b13a4e983860efa197cc8ae63d17237c4baf69960b059ffb7cfd3df9e59 |
Hashes for semsimian-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ab6e4c04f4e492418238f27de31cc1b5c2c815f49a3137bfa26af9e4c416ec8 |
|
MD5 | 8a90c63df851fd7c7da4d2a079cfcaf6 |
|
BLAKE2b-256 | ccfdf2968f2d5adfc92519ddd6574d244791ad6e7bf57a68ad8e5399ab5e9e4f |
Hashes for semsimian-0.2.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daac6801d95f56ae8d1a27036ce955d3fc6420e92f11b2796694613c9714a85f |
|
MD5 | 58e2a2d86c4fabdf565ca6c3e1966245 |
|
BLAKE2b-256 | aaf6f744057573390a4fab431798cff72cdf78bf48213e64f1868076ac5546f2 |
Hashes for semsimian-0.2.9-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d06b4c7802c748761b8416b1ba2b72edd3b304aa271a9d79245f7daf671b9ee6 |
|
MD5 | c384f2540a49ba3ba6ea806a3497077c |
|
BLAKE2b-256 | 0d851e3c67a11e9d28a7fa5fce1c6ada95ec12d8cda4536d78a7f1ff199df6ca |
Hashes for semsimian-0.2.9-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d55ff61e3f2064a13c4c144e6842f4b45ea45cfc9bc95d4e68ff60b66323222f |
|
MD5 | ae28598c98e2729f24855e74998360ea |
|
BLAKE2b-256 | 8ecbabb6a824830380d343541fb1fb6c328c148297626ac0d322b01c2a28612c |
Hashes for semsimian-0.2.9-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d62c2feedc94c41b601373d799b9d2be4ccc94dff3db2d9f259d5730760cf9e |
|
MD5 | 8869d9cf13b2247219d990be0b86669f |
|
BLAKE2b-256 | 981d2f65965ed5676867424c6590e51b2c7aff6de445eb93826a30dde75a2699 |
Hashes for semsimian-0.2.9-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fb3d5fceee416d8512963f2e0b0e58613c1d22c4fb86aef956df6e60045429e |
|
MD5 | f1eff1c281ceaba4a6221a3924d8f09a |
|
BLAKE2b-256 | abd715d531419eb9df107dad7ee0ac613a793e31534d5fb7143096a0672aaa98 |
Hashes for semsimian-0.2.9-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be56a8d608492cd98af37b85d02f59368cb9a0e6be7d3b0924fa0137949091ce |
|
MD5 | 17b70bab61bebc72bf57fe0dfcd6ca14 |
|
BLAKE2b-256 | 6d68dc9376af9b69873e48972653ba82631a54f63623676f5d0ae7ba86e2b8c0 |
Hashes for semsimian-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce1fc5a5d046593dbed53064fec0cc0487c98b8ca2bc58ed73b5cfc0cd3a8866 |
|
MD5 | b77acb9f546af5e9f4cb331d60a31a50 |
|
BLAKE2b-256 | 1ed72e893c6b9c98c59e685d32482e1773e6c25e8779de1db79fbd614e1580da |
Hashes for semsimian-0.2.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b099870a73c431233084093baac95fe2d1f6d89f93d7fdb6551bf7cca6d83b82 |
|
MD5 | 18a958ad280dc91f5f2a4344fd398f7a |
|
BLAKE2b-256 | 122483b92f1356880c751c95db9fc8353fde5844ef5181baae52f3222fa2e291 |
Hashes for semsimian-0.2.9-cp37-cp37m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f6f4469e4d6ef6619de9ddcaf7906dce434f1577f6f837f3d8260e4308b86cd |
|
MD5 | cf619feb9bb3d8f53b4791612e430054 |
|
BLAKE2b-256 | afde494c6ef236399a918f3c4b7cf234829d5b4dc2bdc8757caeb3d3ea0948e1 |
Hashes for semsimian-0.2.9-cp37-cp37m-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d4a181618216e1f5698dc905c7194824c3c22557dd4de258d129e75ab616b2 |
|
MD5 | c8432c126e5a330c399428e62cfed12f |
|
BLAKE2b-256 | 5105f1ce76fa0ef305a6b9625fa4e5d4d2314638ce92675bc340d0390b87c5af |