{"id":49070806,"url":"https://github.com/brennercruvinel/neuralsemantic","last_synced_at":"2026-04-20T07:30:28.492Z","repository":{"id":306879319,"uuid":"1027486198","full_name":"brennercruvinel/neuralsemantic","owner":"brennercruvinel","description":"neural-semantic engineering focused on reducing real token usage, not just character count","archived":false,"fork":false,"pushed_at":"2025-07-28T06:55:08.000Z","size":305,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2025-07-28T08:21:48.954Z","etag":null,"topics":["encoder","neural","nlu-engine","reversable-encoded","reverse-engineering","semantic","semantic-segmentation"],"latest_commit_sha":null,"homepage":"https://github.com/brennercruvinel/neurals","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brennercruvinel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-28T04:59:54.000Z","updated_at":"2025-07-28T06:14:34.000Z","dependencies_parsed_at":"2025-07-28T08:34:02.350Z","dependency_job_id":null,"html_url":"https://github.com/brennercruvinel/neuralsemantic","commit_stats":null,"previous_names":["brennercruvinel/neuralsemantic"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/brennercruvinel/neuralsemantic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brennercruvinel%2Fneuralsemantic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brennercruvinel%2Fneuralsemantic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brennercruvinel%2Fneuralsemantic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brennercruvinel%2Fneuralsemantic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brennercruvinel","download_url":"https://codeload.github.com/brennercruvinel/neuralsemantic/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brennercruvinel%2Fneuralsemantic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32037722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encoder","neural","nlu-engine","reversable-encoded","reverse-engineering","semantic","semantic-segmentation"],"created_at":"2026-04-20T07:30:26.435Z","updated_at":"2026-04-20T07:30:28.478Z","avatar_url":"https://github.com/brennercruvinel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Semantic Compiler\n\n[![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE)\n[![Copyright](https://img.shields.io/badge/Copyright-Brenner%20Cruvinel-blue.svg)](https://github.com/brennercruvinel)\n[![Version](https://img.shields.io/badge/version-0.3.0--alpha-orange.svg)](https://github.com/brennercruvinel/neuralsemantic)\n[![Status](https://img.shields.io/badge/status-early%20development-orange.svg)](https://github.com/brennercruvinel/neuralsemantic)\n\n\u003e **⚠️ PROPRIETARY SOFTWARE - ALL RIGHTS RESERVED ⚠️**\n\u003e \n\u003e Copyright © 2025 Brenner Cruvinel. This software contains proprietary algorithms and trade secrets. Unauthorized use, reproduction, or distribution is strictly prohibited.\n\u003e\n\u003e **IMPORTANT: This project is currently in early development (approximately 20% complete). The application is not production-ready and contains bugs. We are actively implementing core features and comprehensive testing.**\n[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![Node](https://img.shields.io/badge/node-16+-green.svg)](https://nodejs.org/)\n[![NPM](https://img.shields.io/badge/npm-%40neurosemantic-red.svg)](https://www.npmjs.com/org/neurosemantic)\n\n## Project Status\n\n**Current State**: Early Alpha (v0.3.0)\n- **Completion**: ~20%\n- **Core Features**: Under active development\n- **Testing**: Implementing comprehensive test suite\n- **Stability**: Expect bugs and breaking changes\n- **API**: Subject to significant changes\n\n## Overview\n\nNeural Semantic Compiler (NSC) is a semantic compression tool that reduces LLM token usage by 40-65% while preserving complete semantic meaning with, not just reduce characters, it's revesability engeerning. It works as a preprocessing layer for any LLM interaction, making AI more accessible and cost-effective.\n\n**Note**: The examples and features described below represent the project's vision. Many are not yet implemented or may work partially.\n\n## Installation\n\n**⚠️ Warning**: Package not yet published to PyPI/NPM. Installation from source only.\n\n**Python (from source):**\n```bash\ngit clone https://github.com/brennercruvinel/neuralsemantic.git\ncd neuralsemantic/python\npip install -e .\n```\n\n**Node.js (coming soon):**\n```bash\n# Not yet available\n# npm install @neurosemantic/core @neurosemantic/cli\n```\n\n**From Source:**\n```bash\ngit clone https://github.com/brennercruvinel/neuralsemantic.git\ncd neuralsemantic\npip install -e .\n```\n\n## Quick Start\n\n⚠️ **Note**: Most features shown below are planned but not yet implemented.\n\n### Command Line (Limited Functionality)\n\n```bash\n# Basic compression (partially working)\npython -m neuralsemantic.cli.main compress \"Your text here\"\n\n# These commands are planned but NOT YET IMPLEMENTED:\n# echo \"Build a production-ready React application with authentication\" | nsc compress\n# nsc compress --domain web-dev \"Implement user authentication system\"\n# nsc compress --show-stats \"Create REST API with Express.js\"\n```\n\n### Python\n\n```python\nfrom neuralsemantic import NeuralSemanticCompiler\n\n# Initialize\ncompiler = NeuralSemanticCompiler()\n\n# Compress text\nresult = compiler.compress(\"Build a production-ready React application\")\n\nprint(f\"Original: {result.original_text}\")\nprint(f\"Compressed: {result.compressed_text}\")\nprint(f\"Token reduction: {(1-result.compression_ratio):.1%}\")\n```\n\n### Node.js\n\n```javascript\nimport { NeuralSemanticCompiler } from '@neurosemantic/core';\n\nconst compiler = new NeuralSemanticCompiler();\nconst result = await compiler.compress(\"Build a production-ready React application\");\n\nconsole.log(`Compressed: ${result.compressedText}`);\nconsole.log(`Token reduction: ${(1 - result.compressionRatio) * 100}%`);\n```\n\n## Examples\n\n### Web Development\n```\nInput:  \"Build a production-ready React application with user authentication,\n         real-time data synchronization, responsive design, error handling\"\n\nOutput: \"bld prod-rdy React app w/ usr auth, RT sync, rsp design, err hdl\"\n\nResult: 53% reduction (12 tokens → 5 tokens)\n```\n\n### Technical Architecture\n```\nInput:  \"Implement microservices architecture with Docker containerization,\n         Kubernetes orchestration, API gateway, monitoring\"\n\nOutput: \"impl μsvc arch w/ Docker, k8s orch, API gtw, mon\"\n\nResult: 44% reduction (14 tokens → 8 tokens)\n```\n\n## Features\n\n### Core Capabilities\n\n- **Token Reduction**: 40-65% average compression ratio\n- **Semantic Preservation**: Maintains 100% of meaning\n- **Real-time Processing**: \u003c 20ms average latency\n- **Framework Agnostic**: Works with any LLM (GPT-4, Claude, Llama)\n- **Domain Optimization**: Specialized patterns for different domains\n\n### Supported Domains\n\n- `general` - Default compression patterns\n- `web-dev` - Web development and frontend\n- `data-science` - Data analysis and ML\n- `devops` - Infrastructure and deployment\n- `agile` - Project management\n\n## Configuration\n\nCreate `~/.neuralsemantic/config.json`:\n\n```json\n{\n  \"compression\": {\n    \"default_level\": \"balanced\",\n    \"semantic_threshold\": 0.90,\n    \"preserve_code\": true,\n    \"preserve_urls\": true\n  },\n  \"domains\": [\"general\", \"web-dev\", \"data-science\"],\n  \"vector\": {\n    \"model\": \"sentence-transformers/all-MiniLM-L6-v2\"\n  }\n}\n```\n\n### Compression Levels\n\n- `light` - Conservative compression, highest quality\n- `balanced` - Optimal balance (default)\n- `aggressive` - Maximum compression\n\n## Advanced Usage\n\n### Pattern Learning\n\nLearn patterns from your codebase:\n\n```bash\nnsc learn --corpus-path ./src --min-frequency 3\n```\n\n### Custom Patterns\n\nAdd domain-specific patterns:\n\n```bash\nnsc add-pattern \"authentication system\" \"auth sys\" --domain web-dev\n```\n\n### Batch Processing\n\n```python\ndocuments = load_documents(\"./docs\")\nresults = compiler.batch_compress(documents)\n\nfor result in results:\n    print(f\"Saved {result.token_savings} tokens\")\n```\n\n## API Reference\n\n### Compression Result\n\n```python\nCompressionResult:\n    original_text: str          # Original input text\n    compressed_text: str        # Compressed output\n    compression_ratio: float    # Compression ratio (0-1)\n    quality_score: float        # Quality score (0-10)\n    token_savings: int          # Tokens saved\n    processing_time_ms: int     # Processing time\n```\n\n### Core Methods\n\n```python\n# Basic compression\nresult = compiler.compress(text, level=\"balanced\", domain=\"general\")\n\n# Batch processing\nresults = compiler.batch_compress(documents)\n\n# Pattern management\ncompiler.add_pattern(original, compressed, domain, priority)\ncompiler.learn_from_corpus(documents)\n```\n\n## Architecture\n\nNSC uses a hybrid architecture combining:\n\n1. **Pattern Matching** - SQLite database for structured patterns\n2. **Vector Similarity** - ChromaDB for semantic search\n3. **ML Optimization** - Automatic pattern discovery\n4. **Quality Validation** - Ensures semantic preservation\n\n### Processing Pipeline\n\n1. Semantic analysis and concept extraction\n2. Domain-specific pattern matching\n3. Vector similarity search\n4. Compression with quality validation\n5. Smart fallback for edge cases\n\n## Performance\n\n| Metric | Value |\n|--------|-------|\n| Average Compression | 40-65% |\n| Processing Speed | \u003c 20ms |\n| Semantic Preservation | \u003e 95% |\n| Memory Usage | \u003c 100MB |\n| Throughput | 10,000 req/s |\n\n## Integration\n\n### Supported LLMs\n- OpenAI \n- Anthropic Claude\n- China models\n- Google Gemini\n- Meta Llama\n- Mistral AI\n- Local models (Ollama)\n\n### Framework Integration\n- LangChain\n- LlamaIndex\n- Semantic Kernel\n- AutoGPT\n\n## Development\n\n### Setup\n\n```bash\ngit clone https://github.com/brennercruvinel/neuralsemantic.git\ncd neuralsemantic\npip install -e .[dev]\n```\n\n### Testing\n\n```bash\n# Run tests\npytest\n\n# Run with coverage\npytest --cov=neuralsemantic\n\n# Run benchmarks\npytest tests/benchmarks/\n```\n\n### Development Roadmap\n\n### Implemented (✓)\n- Basic project structure\n- Core compression algorithms (partial)\n- Simple pattern matching\n- Basic CLI interface\n\n### In Progress ()\n- Comprehensive test suite\n- Pattern database implementation\n- Vector similarity search\n- Quality validation system\n- Domain-specific patterns\n\n### Planned ()\n- ChromaDB integration\n- ML-based pattern learning\n- Multi-language support\n- API server\n- Performance optimizations\n- Documentation\n- Package publishing (PyPI/NPM)\n\n## Known Issues\n\n- Pattern matching is inconsistent\n- No proper error handling\n- Memory leaks in vector operations\n- CLI commands may fail unexpectedly\n- Compression quality varies significantly\n- No data persistence between sessions\n\n## Contributing\n\n**This is proprietary software. External contributions are not accepted.**\n\n## License\n\n**PROPRIETARY LICENSE** - All Rights Reserved\n\nThis software is protected by copyright and contains proprietary algorithms and trade secrets. See [LICENSE](LICENSE) for details.\n\n## Contact \u0026 Licensing\n\nFor licensing inquiries or commercial use:\n\n- **Author**: Brenner Cruvinel\n- **Email**: cruvinelbrenner@gmail.com\n- **GitHub**: [@brennercruvinel](https://github.com/brennercruvinel)\n\n## Legal Notice\n\nCopyright © 2025 Brenner Cruvinel. All Rights Reserved.\n\nUnauthorized use, reproduction, or distribution of this software is strictly prohibited and will be prosecuted to the fullest extent of the law.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrennercruvinel%2Fneuralsemantic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrennercruvinel%2Fneuralsemantic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrennercruvinel%2Fneuralsemantic/lists"}