Skip to main content

A package to convert CSV files into ontology TTL files and merge them

Project description

🏰 Ontology Project

This package converts CSV files into RDF/OWL ontologies in TTL format and merges them using SBERT-based entity matching.


📌 Project Structure

Your project is structured as follows:

ontology_project/
│-- ontology_project/               # Python package
│   │-- __init__.py                 # Marks as a package
│   │-- Ec3EpdCsv_to_Ec3Epd_onto1.py  # Converts EC3EPD CSV to TTL
│   │-- TruCsv_to_Tru_onto2.py       # Converts TRU CSV to TTL
│   │-- McpCsv_to_Mcp_onto3.py       # Converts MCP CSV to TTL
│   │-- merge_ontology.py            # Merges all TTL files
│   │-- runner.py                    # Automates the pipeline
│
│-- input/                           # CSV input files (Not included in package)
│-- output/                          # Stores generated TTL files (Not included in package)
│-- config.json                      # Stores file paths (Optional)
│-- pyproject.toml                    # Packaging metadata
│-- requirements.txt                  # Dependencies
│-- README.md                         # Documentation
│-- LICENSE                           # License file
│-- .gitignore                        # Ignore unnecessary files

🚀 Installation

🔹 Install from PyPI

After uploading your package to PyPI, install it via:

pip install ontology_project

🔹 Install Locally (Development Mode)

If you want to modify the package, install it locally:

pip install -e .

Usage

Once installed, you can run the following CLI commands:

Command Description
convert_ec3 Converts EC3EPD CSV to TTL
convert_tru Converts TRU CSV to TTL
convert_mcp Converts MCP CSV to TTL
merge_ontologies Merges all TTL files
run_ontology Runs the full pipeline

Example:

convert_ec3
convert_tru
convert_mcp
merge_ontologies
run_ontology

🛠 Building the Package

Step 1: Install Required Tools

pip install build twine

Step 2: Build the Package

python -m build

Step 3: Test Installation

pip install dist/ontology_project-0.1.0-py3-none-any.whl

Step 4: Upload to PyPI

twine upload dist/*

🎯 Configuration

You can modify file paths in config.json:

{
  "input_paths": {
    "ec3epd": "input/ec3epd.csv",
    "tru": "input/tru.csv",
    "mcp": "input/mcp.csv"
  },
  "output_paths": {
    "ec3epd": "output/ec3epd.ttl",
    "tru": "output/tru.ttl",
    "mcp": "output/mcp.ttl",
    "merged": "output/merged_ontology.ttl"
  }
}

🐜 License

This project is licensed under the MIT License.


👨‍💻 Contributing

We welcome contributions! Please:

  • Fork the repository on GitHub
  • Create a new branch (feature/new-feature)
  • Submit a pull request

🌍 Resources


🚀 Now try this! This README.md will be displayed correctly in GitHub, PyPI, and Visual Studio Code. 😊 Let me know if you need further improvements!

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

ontology_project-0.1.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

ontology_project-0.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file ontology_project-0.1.1.tar.gz.

File metadata

  • Download URL: ontology_project-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ontology_project-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a6ce061cd2993aa3d062066ac1d861db74015e898b4e58cc69595d40e99eff9b
MD5 d234d21531e56fcaa23cc5fb4bcaab05
BLAKE2b-256 81fc03c2a9543d5241f2ae32c86ac87a55918a73c2c41c758598139fb632d685

See more details on using hashes here.

File details

Details for the file ontology_project-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ontology_project-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43f76805fded9a93ae2c3d7de22ce3687a58c19907604ada63652af3209706ce
MD5 828fa6440f8e07eaf0529c67a77e13bf
BLAKE2b-256 7aa9407d3c53bb4de3f2800c1d1ca29d37f048b97cbdc025a61f9169e54966d5

See more details on using hashes here.

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