Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
docs: Add GitHub Pages documentation site
KaifAhmad174ba37849fae
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlnew file mode 100644index 00000000..f66b3039--- /dev/null+++ b/.github/workflows/docs.yml@@ -0,0 +1,49 @@+name: Deploy Documentation++on:+ push:+ branches:+ - main+ paths:+ - 'docs/**'+ - '.github/workflows/docs.yml'+ workflow_dispatch:++permissions:+ contents: read+ pages: write+ id-token: write++concurrency:+ group: "pages"+ cancel-in-progress: false++jobs:+ build:+ runs-on: ubuntu-latest+ steps:+ - name: Checkout+ uses: actions/checkout@v4++ - name: Setup Pages+ uses: actions/configure-pages@v4++ - name: Build with Jekyll+ uses: actions/jekyll-build-pages@v1+ with:+ source: ./docs++ - name: Upload artifact+ uses: actions/upload-pages-artifact@v3++ deploy:+ environment:+ name: github-pages+ url: ${{ steps.deployment.outputs.page_url }}+ runs-on: ubuntu-latest+ needs: build+ steps:+ - name: Deploy to GitHub Pages+ id: deployment+ uses: actions/deploy-pages@v4+diff --git a/docs/Gemfile b/docs/Gemfilenew file mode 100644index 00000000..635b0976--- /dev/null+++ b/docs/Gemfile@@ -0,0 +1,6 @@+source 'https://rubygems.org'++gem 'github-pages', group: :jekyll_plugins+gem 'jekyll-feed', '~> 0.12'+gem 'jekyll-sitemap'+diff --git a/docs/_config.yml b/docs/_config.ymlnew file mode 100644index 00000000..2901e587--- /dev/null+++ b/docs/_config.yml@@ -0,0 +1,21 @@+title: Semantica Documentation+description: Open Source Framework for Semantic Intelligence & Knowledge Engineering+theme: jekyll-theme-minimal+logo: /semantica_logo.png+show_downloads: false+github:+ repository_url: https://github.com/Hawksight-AI/semantica+ repository_name: Hawksight-AI/semantica++plugins:+ - jekyll-feed+ - jekyll-sitemap++# Navigation+nav:+ - Home: index.md+ - Installation: installation.md+ - Quick Start: quickstart.md+ - API Reference: api.md+ - Examples: examples.md+diff --git a/docs/api.md b/docs/api.mdnew file mode 100644index 00000000..05a7267b--- /dev/null+++ b/docs/api.md@@ -0,0 +1,69 @@+# API Reference++## Core Classes++### Semantica++Main framework class for building semantic layers and knowledge graphs.++```python+from semantica import Semantica++semantica = Semantica(config=None)+```++**Methods:**+- `build_knowledge_base(sources, **kwargs)` - Build knowledge base from sources+- `process_document(source)` - Process a single document+- `extract_entities(text)` - Extract entities from text+- `extract_relationships(text)` - Extract relationships from text++## Modules++### Knowledge Graph (`semantica.kg`)++```python+semantica.kg.build_graph(sources)+semantica.kg.analyze(graph)+semantica.kg.visualize(graph)+```++### Semantic Extraction (`semantica.semantic_extract`)++```python+semantica.semantic_extract.extract_entities(text)+semantica.semantic_extract.extract_relationships(text)+semantica.semantic_extract.extract_triples(text)+```++### Embeddings (`semantica.embeddings`)++```python+semantica.embeddings.generate(text)+semantica.embeddings.generate_batch(texts)+```++### Export (`semantica.export`)++```python+semantica.export.to_rdf(kg, path)+semantica.export.to_json(kg, path)+semantica.export.to_csv(kg, path)+```++## Configuration++```python+from semantica import Config++config = Config(+ embeddings=True,+ graph=True,+ normalize=True+)++semantica = Semantica(config=config)+```++For full API documentation, see [MODULES_DOCUMENTATION.md](../MODULES_DOCUMENTATION.md)+diff --git a/docs/examples.md b/docs/examples.mdnew file mode 100644index 00000000..44cc5003--- /dev/null+++ b/docs/examples.md@@ -0,0 +1,73 @@+# Examples++## Example 1: Basic Knowledge Graph++```python+from semantica import Semantica++semantica = Semantica()++# Build KG from PDF+result = semantica.build_knowledge_base(+ sources=["research_paper.pdf"],+ embeddings=True,+ graph=True+)++kg = result["knowledge_graph"]+print(f"Entities: {len(kg['entities'])}")+print(f"Relationships: {len(kg['relationships'])}")+```++## Example 2: Entity Extraction++```python+from semantica import Semantica++semantica = Semantica()++text = """+Apple Inc. is a technology company founded by Steve Jobs.+The company is headquartered in Cupertino, California.+"""++entities = semantica.semantic_extract.extract_entities(text)+for entity in entities:+ print(f"{entity['text']}: {entity['type']}")+```++## Example 3: Multi-Source Integration++```python+from semantica import Semantica++semantica = Semantica()++sources = [+ "documents/finance_report.pdf",+ "documents/market_analysis.docx",+ "https://example.com/news-article"+]++result = semantica.build_knowledge_base(sources)+```++## Example 4: Export Formats++```python+from semantica import Semantica++semantica = Semantica()+kg = semantica.kg.build_graph(["data.pdf"])++# Export to multiple formats+semantica.export.to_rdf(kg, "output.rdf")+semantica.export.to_json(kg, "output.json")+semantica.export.to_owl(kg, "output.owl")+```++## More Examples++- [Code Examples](../CodeExamples.md)+- [Cookbook Notebooks](../cookbook/)+diff --git a/docs/index.md b/docs/index.mdnew file mode 100644index 00000000..0b189bad--- /dev/null+++ b/docs/index.md@@ -0,0 +1,95 @@+# π§ Semantica++**Open Source Framework for Semantic Intelligence & Knowledge Engineering**++> **Transform chaotic data into intelligent knowledge.**++<div align="center">++[](https://www.python.org/downloads/)+[](https://opensource.org/licenses/MIT)+[](https://badge.fury.io/py/semantica)+[](https://pepy.tech/project/semantica)++</div>++---++## π Quick Start++### Installation++```bash+pip install semantica+```++### Basic Usage++```python+from semantica import Semantica++# Initialize Semantica+semantica = Semantica()++# Build knowledge graph from data+result = semantica.build_knowledge_base(+ sources=["document.pdf", "data.json"],+ embeddings=True,+ graph=True+)++# Access the knowledge graph+kg = result["knowledge_graph"]+print(f"Entities: {len(kg['entities'])}")+print(f"Relationships: {len(kg['relationships'])}")+```++---++## π Documentation++- [Installation Guide](#installation)+- [Quick Start](#quick-start)+- [Core Features](#core-features)+- [Examples](#examples)+- [API Reference](#api-reference)++---++## β¨ Core Features++- **Semantic Layer Construction**: Build semantic layers from unstructured data+- **Knowledge Graph Generation**: Create and manage knowledge graphs+- **Entity & Relationship Extraction**: Extract entities and relationships from text+- **Conflict Resolution**: Multiple strategies for resolving data conflicts+- **Multiple Export Formats**: Export to RDF, OWL, JSON, CSV, YAML, and more+- **Vector Store Integration**: Store and query embeddings+- **Embedding Generation**: Generate embeddings for text, images, and audio++---++## π Learn More++- [Full Documentation](../README.md)+- [Module Documentation](../MODULES_DOCUMENTATION.md)+- [Code Examples](../CodeExamples.md)+- [GitHub Repository](https://github.com/Hawksight-AI/semantica)++---++## π€ Contributing++We welcome contributions! Please see our [Contributing Guide](https://github.com/Hawksight-AI/semantica/blob/main/CONTRIBUTING.md) for details.++---++## π License++This project is licensed under the MIT License - see the [LICENSE](../LICENSE) file for details.++---++## π Acknowledgments++Built with β€οΈ by the Semantica community.+diff --git a/docs/installation.md b/docs/installation.mdnew file mode 100644index 00000000..3a03698a--- /dev/null+++ b/docs/installation.md@@ -0,0 +1,72 @@+# Installation++## Prerequisites++- Python 3.8 or higher+- pip (Python package installer)++## Basic Installation++Install Semantica from PyPI:++```bash+pip install semantica+```++## Verify Installation++Check that Semantica is installed correctly:++```bash+python -c "import semantica; print(semantica.__version__)"+```++You should see: `0.0.1`++## Development Installation++To install Semantica in development mode:++```bash+git clone https://github.com/Hawksight-AI/semantica.git+cd semantica+pip install -e .+```++## Optional Dependencies++Install optional features:++```bash+# GPU support+pip install semantica[gpu]++# Visualization+pip install semantica[viz]++# All LLM providers+pip install semantica[llm-all]++# Cloud integrations+pip install semantica[cloud]+```++## Troubleshooting++### Common Issues++**Issue**: `ModuleNotFoundError: No module named 'semantica'`+- **Solution**: Make sure you've activated the correct Python environment++**Issue**: Installation fails+- **Solution**: Upgrade pip: `pip install --upgrade pip`++**Issue**: GPU dependencies fail+- **Solution**: Install CPU-only version first, then add GPU support++## Next Steps++- [Quick Start Guide](quickstart.md)+- [Configuration](configuration.md)+- [Examples](examples.md)+diff --git a/docs/preview.html b/docs/preview.htmlnew file mode 100644index 00000000..14784e6c--- /dev/null+++ b/docs/preview.html@@ -0,0 +1,221 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Semantica Documentation</title>+ <style>+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ body {+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;+ line-height: 1.6;+ color: #333;+ background: #f5f5f5;+ }+ .container {+ max-width: 1200px;+ margin: 0 auto;+ padding: 20px;+ }+ header {+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);+ color: white;+ padding: 60px 20px;+ text-align: center;+ border-radius: 10px;+ margin-bottom: 30px;+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);+ }+ header h1 {+ font-size: 3em;+ margin-bottom: 10px;+ }+ header p {+ font-size: 1.2em;+ opacity: 0.9;+ }+ .badges {+ margin: 20px 0;+ }+ .badge {+ display: inline-block;+ padding: 5px 10px;+ margin: 5px;+ background: rgba(255,255,255,0.2);+ border-radius: 5px;+ font-size: 0.9em;+ }+ .content {+ background: white;+ padding: 40px;+ border-radius: 10px;+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);+ margin-bottom: 20px;+ }+ .section {+ margin-bottom: 40px;+ }+ .section h2 {+ color: #667eea;+ border-bottom: 2px solid #667eea;+ padding-bottom: 10px;+ margin-bottom: 20px;+ }+ .code-block {+ background: #f8f9fa;+ border-left: 4px solid #667eea;+ padding: 15px;+ margin: 15px 0;+ border-radius: 5px;+ overflow-x: auto;+ }+ .code-block code {+ font-family: 'Courier New', monospace;+ color: #e83e8c;+ }+ .features {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));+ gap: 20px;+ margin: 20px 0;+ }+ .feature-card {+ background: #f8f9fa;+ padding: 20px;+ border-radius: 8px;+ border-left: 4px solid #667eea;+ }+ .feature-card strong {+ color: #667eea;+ display: block;+ margin-bottom: 8px;+ }+ .nav-links {+ display: flex;+ flex-wrap: wrap;+ gap: 15px;+ margin: 20px 0;+ }+ .nav-link {+ padding: 10px 20px;+ background: #667eea;+ color: white;+ text-decoration: none;+ border-radius: 5px;+ transition: background 0.3s;+ }+ .nav-link:hover {+ background: #5568d3;+ }+ footer {+ text-align: center;+ padding: 20px;+ color: #666;+ margin-top: 40px;+ }+ </style>+</head>+<body>+ <div class="container">+ <header>+ <h1>π§ Semantica</h1>+ <p>Open Source Framework for Semantic Intelligence & Knowledge Engineering</p>+ <p style="font-style: italic; margin-top: 10px;">Transform chaotic data into intelligent knowledge.</p>+ <div class="badges">+ <span class="badge">Python 3.8+</span>+ <span class="badge">MIT License</span>+ <span class="badge">PyPI</span>+ <span class="badge">Open Source</span>+ </div>+ </header>++ <div class="content">+ <div class="section">+ <h2>π Quick Start</h2>+ <h3>Installation</h3>+ <div class="code-block">+ <code>pip install semantica</code>+ </div>++ <h3>Basic Usage</h3>+ <div class="code-block">+ <code>from semantica import Semantica<br><br>+# Initialize Semantica<br>+semantica = Semantica()<br><br>+# Build knowledge graph from data<br>+result = semantica.build_knowledge_base(<br>+ sources=["document.pdf", "data.json"],<br>+ embeddings=True,<br>+ graph=True<br>+)<br><br>+# Access the knowledge graph<br>+kg = result["knowledge_graph"]<br>+print(f"Entities: {len(kg['entities'])}")<br>+print(f"Relationships: {len(kg['relationships'])}")</code>+ </div>+ </div>++ <div class="section">+ <h2>π Documentation</h2>+ <div class="nav-links">+ <a href="#" class="nav-link">Installation Guide</a>+ <a href="#" class="nav-link">Quick Start</a>+ <a href="#" class="nav-link">Core Features</a>+ <a href="#" class="nav-link">Examples</a>+ <a href="#" class="nav-link">API Reference</a>+ </div>+ </div>++ <div class="section">+ <h2>β¨ Core Features</h2>+ <div class="features">+ <div class="feature-card">+ <strong>Semantic Layer Construction</strong>+ Build semantic layers from unstructured data+ </div>+ <div class="feature-card">+ <strong>Knowledge Graph Generation</strong>+ Create and manage knowledge graphs+ </div>+ <div class="feature-card">+ <strong>Entity & Relationship Extraction</strong>+ Extract entities and relationships from text+ </div>+ <div class="feature-card">+ <strong>Conflict Resolution</strong>+ Multiple strategies for resolving data conflicts+ </div>+ <div class="feature-card">+ <strong>Multiple Export Formats</strong>+ Export to RDF, OWL, JSON, CSV, YAML, and more+ </div>+ <div class="feature-card">+ <strong>Vector Store Integration</strong>+ Store and query embeddings+ </div>+ </div>+ </div>++ <div class="section">+ <h2>π Learn More</h2>+ <ul style="list-style: none; padding: 0;">+ <li style="padding: 8px 0;">π <a href="#" style="color: #667eea;">Full Documentation</a></li>+ <li style="padding: 8px 0;">π <a href="#" style="color: #667eea;">Module Documentation</a></li>+ <li style="padding: 8px 0;">π» <a href="#" style="color: #667eea;">Code Examples</a></li>+ <li style="padding: 8px 0;">π <a href="#" style="color: #667eea;">GitHub Repository</a></li>+ </ul>+ </div>+ </div>++ <footer>+ <p>Built with β€οΈ by the Semantica community</p>+ <p style="margin-top: 10px; font-size: 0.9em;">MIT License β’ 100% Open Source</p>+ </footer>+ </div>+</body>+</html>+diff --git a/docs/quickstart.md b/docs/quickstart.mdnew file mode 100644index 00000000..2dc839b2--- /dev/null+++ b/docs/quickstart.md@@ -0,0 +1,83 @@+# Quick Start Guide++Get started with Semantica in 5 minutes!++## Basic Example++```python+from semantica import Semantica++# Initialize Semantica+semantica = Semantica()++# Build knowledge graph from a document+result = semantica.build_knowledge_base(+ sources=["document.pdf"],+ embeddings=True,+ graph=True+)++# Access results+kg = result["knowledge_graph"]+embeddings = result["embeddings"]+statistics = result["statistics"]++print(f"Extracted {len(kg['entities'])} entities")+print(f"Created {len(kg['relationships'])} relationships")+```++## Extract Entities and Relationships++```python+from semantica import Semantica++semantica = Semantica()++# Extract from text+text = "Apple Inc. was founded by Steve Jobs in Cupertino, California."++result = semantica.semantic_extract.extract_entities(text)+entities = result["entities"]++for entity in entities:+ print(f"{entity['text']} - {entity['type']}")+```++## Build Knowledge Graph++```python+from semantica import Semantica++semantica = Semantica()++# Build KG from multiple sources+sources = [+ "document1.pdf",+ "document2.docx",+ "https://example.com/article"+]++kg = semantica.kg.build_graph(sources)+semantica.kg.visualize(kg)+```++## Export Knowledge Graph++```python+from semantica import Semantica++semantica = Semantica()+kg = semantica.kg.build_graph(["data.pdf"])++# Export to different formats+semantica.export.to_rdf(kg, "output.rdf")+semantica.export.to_json(kg, "output.json")+semantica.export.to_csv(kg, "output.csv")+```++## Next Steps++- [Full Documentation](../README.md)+- [API Reference](api.md)+- [More Examples](examples.md)+