Skip to main content

Sematic similarity calculations for ontologies implemented in Rust.

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.

Rust Installation

  • cargo add semsimian

Python 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.2.11, the semsimian source is released on GitHub, with a corresponding set of Python wheels released to PyPi and a corresponding release in crates.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

semsimian-0.2.14rc1-cp312-none-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

semsimian-0.2.14rc1-cp312-cp312-musllinux_1_2_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

semsimian-0.2.14rc1-cp312-cp312-musllinux_1_2_aarch64.whl (2.1 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.2+ ARM64

semsimian-0.2.14rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

semsimian-0.2.14rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

semsimian-0.2.14rc1-cp312-cp312-macosx_10_12_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

semsimian-0.2.14rc1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.0 MB view hashes)

Uploaded CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

semsimian-0.2.14rc1-cp311-none-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

semsimian-0.2.14rc1-cp311-cp311-musllinux_1_2_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

semsimian-0.2.14rc1-cp311-cp311-musllinux_1_2_aarch64.whl (2.1 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ ARM64

semsimian-0.2.14rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

semsimian-0.2.14rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

semsimian-0.2.14rc1-cp311-cp311-macosx_10_12_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

semsimian-0.2.14rc1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.0 MB view hashes)

Uploaded CPython 3.11 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

semsimian-0.2.14rc1-cp310-none-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

semsimian-0.2.14rc1-cp310-cp310-musllinux_1_2_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

semsimian-0.2.14rc1-cp310-cp310-musllinux_1_2_aarch64.whl (2.1 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ ARM64

semsimian-0.2.14rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

semsimian-0.2.14rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

semsimian-0.2.14rc1-cp310-cp310-macosx_10_12_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

semsimian-0.2.14rc1-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.0 MB view hashes)

Uploaded CPython 3.10 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

semsimian-0.2.14rc1-cp39-none-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

semsimian-0.2.14rc1-cp39-cp39-musllinux_1_2_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

semsimian-0.2.14rc1-cp39-cp39-musllinux_1_2_aarch64.whl (2.1 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ ARM64

semsimian-0.2.14rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

semsimian-0.2.14rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

semsimian-0.2.14rc1-cp39-cp39-macosx_10_12_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.9 macOS 10.12+ x86-64

semsimian-0.2.14rc1-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.0 MB view hashes)

Uploaded CPython 3.9 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

semsimian-0.2.14rc1-cp38-none-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

semsimian-0.2.14rc1-cp38-cp38-musllinux_1_2_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.2+ x86-64

semsimian-0.2.14rc1-cp38-cp38-musllinux_1_2_aarch64.whl (2.1 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.2+ ARM64

semsimian-0.2.14rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

semsimian-0.2.14rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

semsimian-0.2.14rc1-cp38-cp38-macosx_10_12_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.8 macOS 10.12+ x86-64

semsimian-0.2.14rc1-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.0 MB view hashes)

Uploaded CPython 3.8 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page