Skip to main content

No project description provided

Project description

BonsaiT: an interface for BONSAI classifications

BonsaiT is a Python package for the standardization of classifications in Life-Cycle Assessment (LCA). It leverages NLP to aligns external classification systems with the BONSAI framework, ensuring data consistency across LCA datasets.

Key components include the Encoder, which converts text to vectors via language models like Sentence Transformers and Hugging Face's BERT, and the BonsaiTransformer, which identifies the BONSAI class most similar to a given source class through vector analysis and cosine similarity.

BonsaiT can be used to:

  • Identify the BONSAI class most similar to a given source class.
  • Translate classifications between different systems.
  • Harmonize LCA data from different sources.

Installation

To get started with BonsaiT, install it via pip:

pip install bonsait

Quick start

Here is how to quickly implement BonsaiT in your project:

from bonsait import BonsaiTransformer

source_class = "electricity from coal"

# Set up the BonsaiTransformer
class_transformer = BonsaiTransformer()

# Perform the transformation to find the BONSAI equivalent
transformed_class = class_transformer.transform(source_class=source_class)
print(f"The source classification <{source_class}> is transformed into BONSAI classification: <{transformed_class}>")

License

BonsaiT is released under the MIT License

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

bonsait-0.1.5.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

bonsait-0.1.5-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file bonsait-0.1.5.tar.gz.

File metadata

  • Download URL: bonsait-0.1.5.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10

File hashes

Hashes for bonsait-0.1.5.tar.gz
Algorithm Hash digest
SHA256 00290e1f64dd21c88d9180d509a7b738568a4f6342a42b700dda1fc78813120a
MD5 092ae794ee27bc59f5f28aa6415123c8
BLAKE2b-256 1301adef66b6d6302acaad15829d7e996bc4e24f5edff40192dc09d0be329649

See more details on using hashes here.

File details

Details for the file bonsait-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: bonsait-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10

File hashes

Hashes for bonsait-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f03477ef10b48adb98ad0169c2195424adafa50b7d4a980c16f1b5e8cc5970e1
MD5 08fb542dea2cba74e804acd44d408320
BLAKE2b-256 885fa4115b877b50263e9a0a33b414492937dac1eeca0d6987c8721d1b3c32d6

See more details on using hashes here.

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