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 ClassTransformer, which identifies the BONSAI class most similar to a given source class through vector analysis and cosine similarity.
BonsaiT streamlines LCA data harmonization, enabling more accurate environmental impact assessments.
Installation
To get started with BonsaiT, install it via pip:
pip install bonsait
Quick start
Here’s how to quickly implement BonsaiT in your project:
from bonsait import ClassTransformer
source_class = "electricity from coal"
# Set up the ClassTransformer with your source classification
class_transformer = ClassTransformer(source_class=source_class)
# Perform the transformation to find the BONSAI equivalent
transformed_class = class_transformer.transform()
print(f"The source classification <{source_class}> is transformed into BONSAI classification: <{transformed_class}>")
License
BonsaiT is released under the MIT License
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 Distribution
Built Distribution
Hashes for bonsait-0.1.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a117d1a0f91e7241b3d2d166465545dc77c0d1c2251c5b7d49689a53207efd5 |
|
MD5 | 04ce0327635e72ecf05cad052f8f2901 |
|
BLAKE2b-256 | e53dad9ae17919ca8d41b6112ea28bcc402ab4a7d15363bc631de9fa5dc00d61 |