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.6-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41d6fefd503744f332244d5e14718ef44e68bb0716c45088897f4d48b72a3ba1 |
|
MD5 | bf0d454778458a21f03d3b53a6455cbd |
|
BLAKE2b-256 | 7c1b57b862d5c188b342c67c3436aba3c0d4cb8ad7702997048459b66e644c4b |
Hashes for semsimian-0.2.6-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 927654068175ff8a657d94ac9049af0ae4ef814ed62d6a5b3a616a8931cdb567 |
|
MD5 | b25f5aef4a9a5393656cbc4a8b1133a9 |
|
BLAKE2b-256 | e85500f458874b17f176307254a443cc4bfde44068fe8c0ea720e27e5cea8bdd |
Hashes for semsimian-0.2.6-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b7cdf272ab8ae599eee4041c0340d0293b6c19bfb543627b49fd6ff24455140 |
|
MD5 | 82669fcab5da155ff260fa0d2cfaf851 |
|
BLAKE2b-256 | 4d9d213aad9399acc6e901bed2cc918d9b75f5a783caa3fc1dfbb201ce8e37c8 |
Hashes for semsimian-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b96a0b5f4552cb0e3ea9ebd5b23861bdb52a011577ffd69babee82d451c21afd |
|
MD5 | 2807b4733ecff0767408ab8985f1924f |
|
BLAKE2b-256 | 16936089006992dd609cdba672899a1b4ceef7e51ac74f2a0d61477439c00eea |
Hashes for semsimian-0.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0175f166fa1232d5f45d13e977327f6c01f81861bc4302123a56c2f5eddb8807 |
|
MD5 | d31cc2007fd14d273191c36c1229e8f2 |
|
BLAKE2b-256 | 327312a40201222a3468e16666165eed55def5696639bd3c6fe23057cc683517 |
Hashes for semsimian-0.2.6-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3f8440170e447cb50bfea3d3976da13a3902f95a41e4f36641cc3a674772197 |
|
MD5 | 06e21597c246a3806d29e0e0b5cfa1bb |
|
BLAKE2b-256 | 6d8ad412915166d03898a881b6e5156751ae1b2f6c2b9c3a26787536ac8681bb |
Hashes for semsimian-0.2.6-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c63a3d0b1d0ef727b660ab98046705e3178452a399ea38f1843814132bc3ad2c |
|
MD5 | c6b1621f5331056aed9ba1e3567a0f13 |
|
BLAKE2b-256 | f065c53722e4c98ab20dea6e01ab13284d14994a14a10001cdb292b3dbdad9e1 |
Hashes for semsimian-0.2.6-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa3847cc224aa25f4ffd33dbc0435df8c087c58e895b1fbd0043be112c9f7b06 |
|
MD5 | 778118d91e3db34b34d2de896e48f307 |
|
BLAKE2b-256 | 658bdb3daf1f128c3084991a2af815a4f8ac36ff1a2bc071543576f74a753e08 |
Hashes for semsimian-0.2.6-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25ef3c6439edebdc7f2a2ec00bdd88e3d356d8ba9f0c7727ab605f6afb25fee2 |
|
MD5 | b9d078022609aec63d02a0a666655c41 |
|
BLAKE2b-256 | d5ad2486fbe57c76e3d8d4629be136405324699dfbacf185808f1f08dc95d000 |
Hashes for semsimian-0.2.6-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b03cd16bc6380dd350d58f7dba4413aa8443d73b5df0cf9f691b384bdbde2f9 |
|
MD5 | 4a20eef9c4f2d6120e8c7c4816c7bc05 |
|
BLAKE2b-256 | 8053e9524d21b775fb702be0fc1c8fde9a171f608d9fc96f3fcdb0aaddce1bf5 |
Hashes for semsimian-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0c224084f81df45c9d72e9dfe88a392ff2742ac2da407e6fb68fe895f354f1e |
|
MD5 | 1388801b6b5f60cfdda088e763aaf5fe |
|
BLAKE2b-256 | 1111f4b1acc6f10ba4fc89057598c44ba1fb37de71eb0a145cdf57320283928a |
Hashes for semsimian-0.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9c585898cd035ed3378695ea36fee19f311f9f13f045c025ff8947c3591e476 |
|
MD5 | d86bc6f552a2671e45080b7c4d9eef11 |
|
BLAKE2b-256 | b93bc1824cbd936788d7c7c37e28e5948e01afbe075905264f1a7b548a106dd6 |
Hashes for semsimian-0.2.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be32ba45fbb640e96fc752cbad438aac5792a350e5239ad14ff84979afd070f0 |
|
MD5 | bf5d9bec30c7a3bb03b0577996fa2785 |
|
BLAKE2b-256 | cc78ab1c688fa1132284abef78d3311258e8604422bd1b58a882e868b5126b7e |
Hashes for semsimian-0.2.6-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b9e989429ddc557046a638fa1869b231238538dcc8cd393263c9cf98d92f1f4 |
|
MD5 | e3aa0f09bc3cab9851c29c1473039e05 |
|
BLAKE2b-256 | b2483e87a3eeb9b385b3fca5f83586ed42048423e5b4a459f7288058617d20cb |
Hashes for semsimian-0.2.6-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13071b5dd6bc65e144a04daafcaecaa207044e9b61088282bbe939ef16d2abf0 |
|
MD5 | d152bd482bdf1f8b084a72dfdb8d3b72 |
|
BLAKE2b-256 | fa92b4f5e3f70c2f7c140e3bc5ce6d2d921293763aa71bd81eb5143bff0f214b |
Hashes for semsimian-0.2.6-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bbcf95f8f57e6a0ceab0898b3392ccf57a350a675207ea9dcb763d7162e6c2a |
|
MD5 | 8881b159309c4a7ba78e500b8f036bab |
|
BLAKE2b-256 | 92bd41a02628e8a7573e86d6e093f7b980c516e6f205b20b8bb824d3bd76fff0 |
Hashes for semsimian-0.2.6-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ac2af47c52709f98bfd28654008b255cdca85ddba0340298f249ad0e17fe33d |
|
MD5 | 2829b7e49ccaa7cf0addf2b29fc75914 |
|
BLAKE2b-256 | f324cd44f91abfc85112490cb87b87de7d47c8e68915b45dea7986cacdf24e4b |
Hashes for semsimian-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50cde16a43c6dcb141dd72373e5cd43a21215c5cd2ec11f469e98ecb20ebd011 |
|
MD5 | 05830091dc8f2ea86cb4a59f9f34e5c6 |
|
BLAKE2b-256 | 9edee28df644eddce9dc62cec46c22a42cf3fbbc419ae43d4ce93b007a7b874f |
Hashes for semsimian-0.2.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7e47367553d8cfa7b8ed6c8433525644e7634cd4867251e8ee54369a2a350a5 |
|
MD5 | d7fcb31f74f0fff3d6828b836df6ee7e |
|
BLAKE2b-256 | 2628263d96026ebb540d175e82beeee0782f080ee8df2e93c7c13d481039040f |
Hashes for semsimian-0.2.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e4b511a4c6452eb36dfec6337bde7790da785830c08e1730a57e37eab822c0f |
|
MD5 | 434678d78afad277d9af8297f224afa2 |
|
BLAKE2b-256 | 1b0d4787204de8cb8173c3417e4bd25775fb07f5cd8b0039ef9444fa15c8d612 |
Hashes for semsimian-0.2.6-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a9e5cfa6bbea8f1fc63a526b6c7ee4b6c8f84ae15ee1e20807ee5e1e6b2e234 |
|
MD5 | 9035e6a06dcafc95198dd9aca47141ea |
|
BLAKE2b-256 | 9c45a5657153645f248570a12902f816f93cd31d63811fe450512914cbbb0b51 |
Hashes for semsimian-0.2.6-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28646f4b971e630428d48bad5272054cd6662f6eefc21f44d91533739bf0b002 |
|
MD5 | 624729e1b5f93312ef5ff86d5ee7ef60 |
|
BLAKE2b-256 | d6cd8bf47539dcdc597554cf37dd6db332f2aa2a3654f0c34ae1fffeaca1b74e |
Hashes for semsimian-0.2.6-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ddcf9f465a9c5c24a0dca33238d74e54dc72d28441707f136b5b8f90f99b2ba |
|
MD5 | 601485a05d964172b896f1d3c2047faa |
|
BLAKE2b-256 | 5bd11ddb0e85544ec2ad6f3aebee1f76d2974744775c5c797692dd4d5d8e6dd0 |
Hashes for semsimian-0.2.6-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aecc5e7ab60d08e4a3223c5903e3800b362af2346f40e2ed5586075b8eacb324 |
|
MD5 | 7d1b831029ecda17cfa34e4b91f753aa |
|
BLAKE2b-256 | e1e84be007488c83498fbd9f0c856dd4ceb0e16ba45e8b0f2abc65400ce14d1a |
Hashes for semsimian-0.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51051637e77e6940678c3ca10477eefb3d7a4a92f75e6709018b1975c35fb63d |
|
MD5 | 832a2581fa30f5b09211d1a2b6049978 |
|
BLAKE2b-256 | 85a11e84c222b4d384faa29ae9e3d561f12986efd12e424f4feadd8cda7a0c0d |
Hashes for semsimian-0.2.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfbaf27103065e8743340b9bde85017f510ff59e3657a91aaa972ba26b063906 |
|
MD5 | 84fd91da636e3d2b03cb8152467916a4 |
|
BLAKE2b-256 | 18e51e5861fbc0144bfbba09ce310f92631db7ce8bb2c3abc15d72c0dc294c22 |
Hashes for semsimian-0.2.6-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2edeba7ccfb6b3d4b120fc0c01ba430063c6fd1c9a5ef0214384bfb2afa18418 |
|
MD5 | 845eb644d75caf973387e5edb4e802e5 |
|
BLAKE2b-256 | 38f5f8d291069af5682b6eb638a0577d9bb8807a28e9bea0f44b79671e95fd8d |
Hashes for semsimian-0.2.6-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2de8fb45ab527bd3403a9a8d8300cbf47491846f21823e540eced47f8ad50ad |
|
MD5 | e0665c9ff0ff2826b8bcdeb4d35db2a4 |
|
BLAKE2b-256 | c35e5394219a2205eeb3c7deb727f216b05057391d74f5600134b3d094100250 |
Hashes for semsimian-0.2.6-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b7981cf9402fb6aa80194643e670098adae431b5027b1579384221075835eab |
|
MD5 | ca90559439ca707989fbe62541d7543f |
|
BLAKE2b-256 | 7b99069e99d7396c474142e512a56889b732be08534de27def17dd32e71e746c |
Hashes for semsimian-0.2.6-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0d7c53c9d463c57e7038d8757f557e550ffc7fa25b6fb1e2df4e4b815cfe445 |
|
MD5 | 152a9d78ac7add600a308810c445db3b |
|
BLAKE2b-256 | 4fafac4acf46cc396980d407c20a6c58eb309c01adf0c564dcc6b25dd7c488de |
Hashes for semsimian-0.2.6-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5bd45db6ca560b8612825d6577f3fc28a0e3cb075c0feeeb3292d278236cabb |
|
MD5 | 4c2fa4b09479698441f470188858a6e0 |
|
BLAKE2b-256 | 1e05f50ae5a87ef0841704caca81576dbc605ac6be1f521d1709cbdf940ee42f |
Hashes for semsimian-0.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b813d97d89b86e85788da8805c6ed88f0e6ab218e149abbcf0eeea6bdced8280 |
|
MD5 | d636f1407f5044532529c9db04a394df |
|
BLAKE2b-256 | 558f2cb5c94732992f83f12cc4cdfdba8fc43b8c5e014ddfbce19479d688c818 |
Hashes for semsimian-0.2.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc003b230e602f9dde3eea467afa504d92fbdc2b6b850d083caa4853df76d0d9 |
|
MD5 | 6c0032150c015622af7a53fabec17d0d |
|
BLAKE2b-256 | 493fccd28476dc8e8a02f44e99b59ede8bb6236ab60ae9323bd690ba841f5897 |
Hashes for semsimian-0.2.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d4b1e57b7eddc4b7e36e21a2a4b999e1f720a43475083ee69ea5eb7213396c9 |
|
MD5 | b5164f42569cb5c2371af043a3e07b9e |
|
BLAKE2b-256 | d19c9471f3126fe6f3296faf34f75cc432c498e0cb4115bd0a6d836da3268ab9 |
Hashes for semsimian-0.2.6-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1a834178af64b308ad586b5870552c9e3b99c4e76b13cc93027aad81eb07c6d |
|
MD5 | 6cccdca4445a9b385f9fb8165a5f8fb5 |
|
BLAKE2b-256 | cad8e267e20fa517b8a2dd8ab70e388ea250e16fdafaebf7983f5e181bcd5d1c |