semvec/pypi-packages huggingface dataset:
wikontic 0.0.7
Extract a knowledge graph with LLM from texts and perform QA over the resulted KG
Requires Python: >=3.9

![Wikontic logo](/media/wikontic.png)

# Wikontic

**Build ontology-aware, Wikidata-aligned knowledge graphs from raw text using LLMs**

---

## 🚀 Overview

Knowledge Graphs (KGs) provide structured, verifiable representations of knowledge, enabling fact grounding and empowering large language models (LLMs) with up-to-date, real-world information. However, creating high-quality KGs from open-domain text is challenging due to issues like redundancy, inconsistency, and lack of alignment with formal ontologies.

**Wikontic** is a multi-stage pipeline for constructing ontology-aligned KGs from unstructured text using LLMs and Wikidata. It extracts candidate triples from raw text, then refines them through ontology-based typing, schema validation, and entity deduplication—resulting in compact, semantically coherent graphs.

---

## 📁 Repository Structure

- `preprocessing/constraint-preprocessing.ipynb`  
  Jupyter notebook for collecting constraint rules from Wikidata.

- `utils/`  
  Utilities for LLM-based triple extraction and alignment with Wikidata ontology rules.


- `utils/openai_utils.py`  
  `LLMTripletExtractor` class for LLM-based triple extraction.


### To use ontology:

- `utils/ontology_mappings/`  
  JSON files containing ontology mappings from Wikidata.

- `utils/structured_inference_with_db.py`  
  - `StructuredInferenceWithDB` class: triple extraction and qa functions

- `utils/structured_aligner.py`
  -  `Aligner` class: ontology alignment and entity name refinement


### Not to use ontology:
- `utils/inference_with_db.py`
  - `InferenceWithDB` class: triple extraction and qa functions

- `utils/dynamic_aligner.py`
  -  `Aligner` class: entity and relation name refinement

### Evaluation:
- `inference_and_eval/`
	- Scripts for building KGs for MuSiQue and HotPot datasets and evaluation of QA performance
- `analysis/`
  - Notebooks with downstream analysis of the resulted KG

### Use Wikontic as a service:

- `pages/` and `Wikontic.py`  
  Code for the web service for knowledge graph extraction and visualization.

- `Dockerfile`  
  For building a containerized web service.


---

## 🏁 Getting Started

1. **Set up the ontology and KG databases:**
   ```
   ./setup_db.sh
   ```

2. **Launch the web service:**
   ```
   streamlit run Wikontic.py
   ```

---

Enjoy building knowledge graphs with Wikontic!
liumify 2.0.0
The Gold Standard of Pythonic Visuals. Proprietary Internal Tool.
Requires Python: >=3.9

# Liumify™

**The Gold Standard of Pythonic Visuals.**

[![Proprietary](https://img.shields.io/badge/License-Liumi_Corp_Proprietary-gold)](LICENSE)
[![Version](https://img.shields.io/badge/Release-2.0.0_Gold-black)]()

---

**WARNING: CONFIDENTIAL.**  
*This software is the private intellectual property of Liumi Corporation. Unauthorized distribution, reverse engineering, or public disclosure of source code is strictly prohibited.*

---

## Overview

**Liumify** is a next-generation UI/UX framework designed exclusively for Liumi Corporation's internal architecture. It allows engineers to build cinema-grade 3D environments and fluid 2D interfaces using pure Python.

By abstracting complex rendering logic into our **Proprietary HD Rendering Core**, developers can focus on business logic while Liumify handles the physics-based lighting, soft shadows, and glassmorphism layouts.

## Key Capabilities

1.  **The Liumi Signature Look:** Out-of-the-box support for our "Gold & Glass" aesthetic.
2.  **HD Rendering Core:** Physically-based materials (PBR) and volumetric lighting.
3.  **Real-time Interactivity:** WebSocket-driven state management for zero-latency updates.
4.  **Python-First API:** Define complex scenes without touching a single line of frontend code.

## Quick Start

Initialize the Liumify Engine and build a dashboard in seconds.

```python
import liumify

# 1. Initialize the Application
app = liumify.LiumifyApp(app_name="Executive Dashboard")

# 2. Add HD 3D Assets
# The 'LiumifySphere' utilizes our internal geometry engine
sphere = liumify.LiumifySphere(radius=1.5)
sphere.set_material(color_hex="#FFD700", roughness=0.1) # Liumi Gold
sphere.set_transform(y=1.0)

floor = liumify.LiumifyPlane(width=30, depth=30)

app.add(sphere)
app.add(floor)

# 3. Add Fluid UI Elements
card = liumify.UI_GlassCard(
    title="Quarterly Projection",
    body="Liumify rendering engine operating at 99.9% efficiency."
)
app.add(card)

# 4. Launch
if __name__ == "__main__":
    # Launches the local secure webview
    app.launch()