Skip to main content

Formal Concept Analysis engine with Python bindings

Project description

mondher

Python bindings to the Mondher formal-concept-analysis engine.

Install

pip install mondher

Quickstart

import mondher

# Read a context file (Burmeister .cxt, CSV, DAT, XML, or JSON).
with open("breakfast.cxt", "rb") as f:
    ctx = mondher.parse_context(f.read(), filename="breakfast.cxt")

# Compute the concept lattice. Default algorithm is "next-closure".
concepts = mondher.compute_concepts(ctx)
print(f"{len(concepts)} concepts")
for c in concepts[:5]:
    print(f"  extent={c['extent']}  intent={c['intent']}")

# Use a different algorithm.
print(mondher.supported_algorithms())  # ['next-closure', 'in-close-5', 'fcbo']
concepts_fast = mondher.compute_concepts(ctx, algorithm="fcbo")

# Compute the Duquenne-Guigues canonical implication base.
implications = mondher.compute_implications(ctx)
for imp in implications[:3]:
    premise = ", ".join(imp["premise"])
    conclusion = ", ".join(imp["conclusion"])
    print(f"  {{{premise}}} -> {{{conclusion}}}")

Supported formats

The parse_context function dispatches on the filename extension:

Extension Format
.cxt Burmeister
.csv Comma-separated values
.dat NCI / dense binary
.xml ConExp XML
.json Mondher JSON

If the filename has no recognized extension, parsing raises ValueError.

License

Proprietary. See the main repository for details.

Project details


Download files

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

Source Distribution

mondher-0.1.0.tar.gz (87.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mondher-0.1.0-cp39-abi3-win_amd64.whl (260.2 kB view details)

Uploaded CPython 3.9+Windows x86-64

mondher-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (348.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

mondher-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (335.5 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

mondher-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (317.9 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

mondher-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl (326.6 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file mondher-0.1.0.tar.gz.

File metadata

  • Download URL: mondher-0.1.0.tar.gz
  • Upload date:
  • Size: 87.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mondher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 05bf1dcc8ed06a9d6bea5563d056dbc647cb2534ba7c3d3a038bb7f762b2bea3
MD5 af93b5bfef3d53dceca2f1ed64d231a8
BLAKE2b-256 aa639e64ce271f6f1d12f5dbcaf9973444fe27232fa5a9b48b225a43105b79ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for mondher-0.1.0.tar.gz:

Publisher: wheels.yml on Feudjio-Anthony/mondher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mondher-0.1.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: mondher-0.1.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 260.2 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mondher-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f60dea1d2d6bb2f79990a8b19944db1a9b5fd4aebbed3eded3701a4b4534e361
MD5 400a047b14c111b51a427f987c355b0d
BLAKE2b-256 d7821cc30a7bb590d2180e3d029a554650975ee2270d94442e6352427807f2c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mondher-0.1.0-cp39-abi3-win_amd64.whl:

Publisher: wheels.yml on Feudjio-Anthony/mondher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mondher-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mondher-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ccc593558bdb1feca9501869b34614cac41082668123ae13e373ea6ea3beda7
MD5 dbf6bd08de246de197b4ae964ad71b75
BLAKE2b-256 fc0a79653e66255d85b50eeaa23fa2ee430aca05c0353f7e253749f7fc8edec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mondher-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on Feudjio-Anthony/mondher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mondher-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mondher-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8b3450a9c7a96f8f7a70319d9fcc4159a3c95be546a8505e64ededb7e2c0a505
MD5 d174495e22ac09f94a0ba3e6eff04854
BLAKE2b-256 83f739bcab4834d508ffcfd83875b63ae4580fb2ac63797d11fceed0a1578a57

See more details on using hashes here.

Provenance

The following attestation bundles were made for mondher-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on Feudjio-Anthony/mondher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mondher-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mondher-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 12cf7b6e1154b9ae1864eabebb312e67b4f5aeabf9ea64704e30c475d683bfa4
MD5 5f5b7e40804ccd29ee36ab7f8d69aee6
BLAKE2b-256 c8346f717a01f21912e6bfbf95cf00bdbab3dd944e796e46ed4f35a8ff156700

See more details on using hashes here.

Provenance

The following attestation bundles were made for mondher-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Feudjio-Anthony/mondher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mondher-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mondher-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fd7aee8477f485b2e75b2225dcf695149280c2d8edca51da3639e5aceb03e39a
MD5 270c49ec1ede4b75d0c5974c16d4e8c4
BLAKE2b-256 9c1e9a54a280f9e9b6eeb07f0eee940a800e623c3c45a1462a635adddd8ff1e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mondher-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: wheels.yml on Feudjio-Anthony/mondher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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