Skip to content

Latest commit

 

History

History
79 lines (61 loc) · 5.35 KB

File metadata and controls

79 lines (61 loc) · 5.35 KB

CléfistAI - ClemScript Generator

Overview

CléfistAI is a French-language AI code generator for the ClemScript programming language. It provides a Streamlit-based web interface that allows users to input natural French language prompts and automatically generates corresponding ClemScript code. The application uses natural language processing to analyze French prompts and convert them into functional programming constructs using a template-based code generation system.

User Preferences

Preferred communication style: Simple, everyday language.

System Architecture

Frontend Architecture

  • Framework: Streamlit web application with a kawaii-themed design
  • Layout: Two-column design with prompt input on the left and generated code output on the right
  • Styling: Custom CSS with gradient backgrounds, rounded corners, and animated hover effects
  • Internationalization: Fully French-language interface optimized for French prompt processing

Backend Architecture

  • Modular Design: Three core components with clear separation of concerns:
    • ClemScriptAnalyzer: Handles natural language processing for French prompts
    • CodeGenerator: Manages code generation using template-based approach
    • ClemScriptTemplates: Repository of predefined templates for various ClemScript constructs
  • Analysis Pipeline: Multi-stage processing including prompt preprocessing, concept detection via keyword matching, value extraction using regex patterns, and template-based code generation

Language Processing Engine

  • French NLP System: Comprehensive keyword dictionary mapping 200+ French terms to programming concepts
  • Pattern Recognition: Advanced regex patterns for extracting variables, values, ranges, operations, and contextual information
  • Concept Coverage: Supports variables, console output, conditionals, loops, user input, mathematical operations, colors, quizzes, interactive adventures, random generation, comments, and functions
  • Value Extraction: Sophisticated regex-based extraction for variable names, numeric values, strings, comparison operators, and domain-specific keywords

Code Generation System

  • Template-Based Architecture: Uses predefined templates for different ClemScript language constructs
  • Concept Mapping: Maps French keywords to programming concepts with fallback mechanisms
  • Multi-Template Support: Different template variations for basic, complex, and specialized code patterns
  • Contextual Generation: Adapts generated code based on extracted values and detected context

ClemScript Language Integration

  • Custom Syntax: Generates code in ClemScript language with French-inspired syntax
  • Language Constructs: Supports variables (Clem var Script), console output (Clem console Script), conditionals (Clem if Script), loops (Clem for Script), and mathematical operations (Clem math Script)
  • Template Categories: Organized templates for variables, console operations, conditions, loops, input handling, mathematical functions, colors, quizzes, interactions, and random generation

External Dependencies

Core Framework

  • Streamlit: Web application framework providing the user interface and page configuration
  • Python Standard Library: Uses re module for regex-based text processing and pattern matching

Language Processing

  • Ultra-Advanced NLP System: Internal French language processing with 800+ keywords and intelligent pattern recognition
  • Regex Engine: Python's built-in regex capabilities enhanced with contextual analysis and smart interaction detection
  • Multi-Pattern Recognition: Advanced algorithms for detecting choices, responses, and conditional flows in natural language

Template System

  • Intelligent Template System: Enhanced template system for ClemScript code generation with adaptive pattern matching
  • Concept-Aware Generation: Smart code generation based on confidence scores and contextual analysis
  • Smart Interaction Engine: Automatic detection and generation of interactive code with choice mapping

Recent Enhancements (August 2025)

Ultra-Intelligence Update

  • 800+ New Keywords: Extended vocabulary with synonyms, expressions, and domain-specific terms
  • Smart Interaction Detection: Automatic extraction of choices, conditions, and responses from natural language
  • Adventure Mode: Intelligent detection of game/story contexts with location-based interactions
  • Multi-Concept Analysis: Enhanced analysis with confidence scoring and intent detection
  • Advanced Pattern Recognition: Support for conditional logic, sequence detection, and response mapping

New Concept Support

  • Animation: Advanced animation controls with transitions and effects
  • Audio: Sound management and audio playback capabilities
  • Data Management: File handling, databases, and data processing
  • AI Integration: Machine learning and artificial intelligence features
  • Network: API calls, web requests, and data synchronization
  • Game Development: Enhanced gaming features with scoring and mechanics

Deployment Optimization

  • Streamlit Cloud Ready: Optimized configuration for seamless deployment on Streamlit Community Cloud
  • Performance Enhanced: Improved analysis speed and reduced computational overhead
  • Kawaii Interface: Enhanced visual design with improved navigation and user experience