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.8-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0113cacbcd33747d774f40176685db5808069aea7a1ca59198cca5e841a10ecf |
|
MD5 | 4047260df06e7363c5cae3c6d088d644 |
|
BLAKE2b-256 | 80886134512570f1ece2d65c28d9a366c6ac902d6c55224d21aeb787f39e0cb7 |
Hashes for semsimian-0.2.8-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 402703c6d6b3bdacf5ae56c0f32d1c8ca51a8f452d53e4f57d432733d5a4d253 |
|
MD5 | f4e178145e5b401a1a81353dad352ffc |
|
BLAKE2b-256 | 259b9d2cb664f80b77c43762a3e46000f8282936bf826c1c325c92f33efa7045 |
Hashes for semsimian-0.2.8-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c01d764e9376f008f43ce8bdbcf5f89812549ec441db734157f7e8181fd4b7b |
|
MD5 | 9219ddeeae8adabbbfc7cdce5d2b027b |
|
BLAKE2b-256 | dc0f8756eddde1725834837027d4f007542713d2bbd4f5ce5add32425ce880f9 |
Hashes for semsimian-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 271fd0e80756fe1f94ace67ff2d34dd9e9e6fc4bd75306c5366f8807de138e9a |
|
MD5 | d983b4c91a90686b7597ba27aba57f15 |
|
BLAKE2b-256 | 23b08c585df70364edf065cb15e867d3f9b516934bd25ff957d017f0b1ed8d7c |
Hashes for semsimian-0.2.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 998bc815daee570a0212611fe02ba65e2731d2c5a7972499469729f13680397c |
|
MD5 | a1500fe45dbee77c123bccdbf8be7979 |
|
BLAKE2b-256 | 2ef6fad7853719afb3fe18ce60e1e1891332fbe3199160c7ff9745c3010606ed |
Hashes for semsimian-0.2.8-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 911077e872a5bc458c6eb7bcb845990ff5ea8b26ac489c6d55bb1a3b8873c39b |
|
MD5 | 7c49b5e177e810a5e8d9fba75fd6c381 |
|
BLAKE2b-256 | b7eb2333a6d173ae7aa47db61fa4501f2bb86d4cc0d7b96886684cf6142d5dd3 |
Hashes for semsimian-0.2.8-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 970eab020d79ddb1390ec15a1459dc0dbe48d8936655eeffa23b9c3fc2ab1e77 |
|
MD5 | 844f2c9968b045620d2c7fe99ae96292 |
|
BLAKE2b-256 | 3915fd812238d9b1ed0a480a0f15394005a50b89eae1a9482a6f78b95ca410c5 |
Hashes for semsimian-0.2.8-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a891d129e0ae9dac96af83b04fec81d2daa57acbc356bb9022342a0cfe98187c |
|
MD5 | 39ec5e05f4c594d6ed97fc7b34ba471b |
|
BLAKE2b-256 | 47d7b6c0fbd6abdac88edb9b446df7272fcfad86aec7fed5e1be8705eb2bff70 |
Hashes for semsimian-0.2.8-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5af911ae910ed160beff118242e951202bd8a7ce1c6830731fb024584e04ddec |
|
MD5 | 814d09da1da7fbe11db5db317840dc73 |
|
BLAKE2b-256 | 6ec44213411cc4d1c84b559f9970829a10c4262a6af90e5434262e833ee1d0b1 |
Hashes for semsimian-0.2.8-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bb1eb6189005263e690f3589cf883b4b8f9bca760d1ea30384fe06726b370c0 |
|
MD5 | 55bca9817caf040081127b28e97c9c52 |
|
BLAKE2b-256 | 9dbab2a7b80c849b19e73e621a595b7afe48d9acab03188d639ab3848e1b26c1 |
Hashes for semsimian-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 979648a3ff6db4a0c0b51f47f6cadc6e515367fd07afd9080c854ad3441d1fed |
|
MD5 | 3e99313aed96c731711ff92ad7d4bac5 |
|
BLAKE2b-256 | 1970c8a85b5634d0b9ba66dc3e1741c03aee01d6b7210c88afe1a129d96ea0de |
Hashes for semsimian-0.2.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61b136c4c7d452ec818dce1ab5d8155a3a3a0def7c8fda456a9e1862f0d4db43 |
|
MD5 | 2e12e0d0001ec5e4129a65c3376d44c6 |
|
BLAKE2b-256 | 51c524bbf578a353a65199764a8951722aa1868bd581379616ca14402b86263f |
Hashes for semsimian-0.2.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fef97bd90feecc56070c0a8ec7d46c7f34b7a8a32e50eaa238edcd9b5fda7d4 |
|
MD5 | 1aa6b19fefac79103c984e4c4292f492 |
|
BLAKE2b-256 | 6169cab0a3e3467ce4712be97e3149f93de88aebd7862ac15e4eb2bc9db9ae1d |
Hashes for semsimian-0.2.8-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d9360cbde5e0081c9a8e1d1cf847dbf2ea58520a8a080a35ae532f42d280308 |
|
MD5 | 5afb300a1d65687b3b9970a8ce59226a |
|
BLAKE2b-256 | e1888ce90aecda3dfa6d313b0e322b5f1671d463e632d723183512da3cff043d |
Hashes for semsimian-0.2.8-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 150222e1785c5c269bdaabd70168c84f1edc998638046bbfbaa9144e2c03926d |
|
MD5 | 322ff686968e993e2d6e5369abf5d439 |
|
BLAKE2b-256 | 275578469d7775323ec358ff515ba913097df559005cf61a13e7e474d52812d3 |
Hashes for semsimian-0.2.8-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd0320504cc82520c0631fc49e1a245b2cf62fbb93ea12266b0373dfc66a6597 |
|
MD5 | 1f2d887c7fac9255a1a081786040c8b9 |
|
BLAKE2b-256 | 8af68387754be928d070f07a20714c260cffd71f869cc0e850697a938e0b9289 |
Hashes for semsimian-0.2.8-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 996a83870460cb0cf336f1049c772eac34f73b24859d7d8d01ec30e47e48a7ef |
|
MD5 | 0b8cb67ad0bc29023c464fb30678d6ac |
|
BLAKE2b-256 | a79e1aaa9418f6db6149035adda9d95d6fcbb334cf33c9141f2c68612733e15e |
Hashes for semsimian-0.2.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2901f1698ba46de485887c412c81366efd18b869c0a2c9d9a1c0460037029244 |
|
MD5 | 1765d9c34fa803f8b79da15eeca196c2 |
|
BLAKE2b-256 | 1e70b42c6723ded441ff51211701ea6fd1fb1fe774fc7617b1136d35d9ecb5f8 |
Hashes for semsimian-0.2.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d59197e9295019b11874a77eb56144abf26af2d900ff3de6378c4e1cdfbaf023 |
|
MD5 | da03f1126730554fa8b87cdf5d9cb62e |
|
BLAKE2b-256 | 1a1046c9845ebe9a57ae57909c106b866fd7eaff6d106e59fdc06070515b46d2 |
Hashes for semsimian-0.2.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 120fd793b504795f1e393653c10e46d5be38179e87bbcbd96b3e3a929f5e9b7d |
|
MD5 | ae16e4e748d94c7883bcf99259b757fc |
|
BLAKE2b-256 | fb5bfdd7157c7108d1a3639a39f13ef785eb4cc10ebf9984129ffb77d1ea3ae5 |
Hashes for semsimian-0.2.8-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81a08601a5bfb6e2bf171e4e08fb9d4c17df09c9bb658f63a517a6881b74043d |
|
MD5 | ec5680e83cce75d989647ce8ad7deb47 |
|
BLAKE2b-256 | 9082542605a996495cc5e2a226d13d269021fd942660d0fdd86d3a4cc7f66e65 |
Hashes for semsimian-0.2.8-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11add630a2e53f9c9f7fb5a0738ba7b5f625bdba6cd055b7a5433999e592eb7d |
|
MD5 | ebb68a7500ad401ac321ebd4326597c9 |
|
BLAKE2b-256 | ae51fe0ad6874a9d091d3643809a414c6308f3351f20c284a5802fc26b50d44e |
Hashes for semsimian-0.2.8-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e6feed4467cd7d5d3a65535ca691d41c022bc6196a04999bf22ee5e4b7aac8f |
|
MD5 | caf5d17fb156612cf6dde6d3278c0983 |
|
BLAKE2b-256 | 211e677bb8cc2f83bda38ef9334164233a446312b42a7320400763498084e86d |
Hashes for semsimian-0.2.8-cp38-cp38-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4202340ba50aaa15681849df1a74823b200363bc9fb9e76d2208047d10dcec2b |
|
MD5 | 559c628a4a8c0ffb48a1997943e43d10 |
|
BLAKE2b-256 | dc9b9d7aa27704c69d30c617860a4a9dbebb7a4ad22e2f2c0526ef5c2c19d485 |
Hashes for semsimian-0.2.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e343128951aa11b95bd1078873ffa826efc5e8619a9a895998a5af4f08d84c3f |
|
MD5 | e59e34201a8279e125ad4c5df6087d17 |
|
BLAKE2b-256 | 449c7082d6fd214a7bb9d4b327696015a396721a483a398e071ce619ae50d929 |
Hashes for semsimian-0.2.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90b965919c6eb3bbdafa864e0177da02a11b0f5dd7b185059df634ea58c9f82f |
|
MD5 | 16facc0a587f5ce2988e6a3bf545830f |
|
BLAKE2b-256 | 83f299d37adb756b3971687efd893032c0b29586794bd85a396cf70724c9c37d |
Hashes for semsimian-0.2.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69c9888ea4a64598704b2a97a85d637212b2c8a52d88f66e28b8b426b6e53ee6 |
|
MD5 | 13cccd99799845737b8181c9f54d45c9 |
|
BLAKE2b-256 | 20c7a90074f5aa579a4caf8beb364799f378b31b75f9c5724197a1457cb7c557 |
Hashes for semsimian-0.2.8-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4011c33b59dc57cfa2584d9f33d5b35f8a9b70ddb1e1df03f5f04e5cbf66eef |
|
MD5 | 08c14c333e82c41dd9cde9ad765e05bf |
|
BLAKE2b-256 | 842e32317f7987b236d7634701ee2bd0e2158b7c1979e75a08a6de887653b889 |
Hashes for semsimian-0.2.8-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b740a4b8c13d845973fcc1b6aec7a6b3b5a4a43b8941c81b9e743df050509f0a |
|
MD5 | 796ef80f291fb606f4471b0e52334f17 |
|
BLAKE2b-256 | b89bcea40c672e82d94b80612b93cc6e88f5b99f4c48d0cc1a66df76f8fea469 |
Hashes for semsimian-0.2.8-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2ddece454ad22c97666e9614ca75eb7754de6456a4608d6a7040fc6761e8d44 |
|
MD5 | 21f1f165dff2f3d7701e6670bc9cd560 |
|
BLAKE2b-256 | fd00cb4f3af00e27344cd7de9d3966b6826a416eaf5ced972ca6dbf3b7715033 |
Hashes for semsimian-0.2.8-cp37-cp37m-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cb48d7231456d9b59b90f5568e6ed4e414c06f5377b942246548b68ab1c8bff |
|
MD5 | 1e6cd9aeacb81642b851786e68aff67e |
|
BLAKE2b-256 | 093275d07d97ddd1cf5c74d846243d39b3051ed7127817d66e931e512996d53e |
Hashes for semsimian-0.2.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e12133d1cf080c1251036c1c5be68623ec560dc73098f7b9691ac20810f44d8e |
|
MD5 | 0abae2df996720e50f40767d0bb70c14 |
|
BLAKE2b-256 | 2b10e0728666881e4efb5104271cc2eb5379defaee63b589ff5b3ddae0d52287 |
Hashes for semsimian-0.2.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb47762b986cdb16603afc7423f66584462c766369a15099cf03a81030da8ab |
|
MD5 | 9ecf27aa837b9ded4a34834b9b6abb9b |
|
BLAKE2b-256 | 994f0a2b99a6c733e39eaf6e1e25a0a01c603e90ed4b4334631916af8fe5b681 |
Hashes for semsimian-0.2.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 626dfae9b1c61de4f43e400f95dff8f8fbd840e7f630a9bba3da7c0903b0679b |
|
MD5 | f2dee2c2813d0ee210b646701e1b15bc |
|
BLAKE2b-256 | 4b6f1cd8262061e4089eccb0eb5c2e35da366d5dc660cfc48649446b2697b018 |
Hashes for semsimian-0.2.8-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8df01396cad03b1a66aeea0c8fb8a9b77b3d2dad81124ec046133b17cf0a4355 |
|
MD5 | 25a69e005a34a60e803eea5878ac0811 |
|
BLAKE2b-256 | f91a7f4f8a1978569dfb75c045af8f78b452b1249af83cd709d7dcb1a131f14d |