Checking access level...

📝 CW Sentences Analytics Documentation

Complete guide to the comprehensive analytics system that tracks multilingual Morse code sentence training with character-level error analysis, language performance comparison, and detailed insights across all training modes and languages.

Sentence Analytics Character Tracking 6 Languages Dual Modes Live APIs

📋 Quick Navigation

🎯 System Overview

The CW Sentences Analytics system provides comprehensive insights into multilingual Morse code sentence training through detailed multi-level data collection and analysis. Every training session automatically captures character-level errors, language-specific performance, and training mode analytics across six supported languages.

🔧 Core Innovation

Character-Level Sentence Analysis: Unlike basic accuracy tracking, this system compares expected vs received sentences character-by-character with full context awareness:
Substitution: User types 'E' instead of 'T' in "THE QUICK BROWN FOX" → "EHE QUICK BROWN FOX"
Omission: User omits a character "HELLO WORLD" → "HELO WORLD"
Insertion: User adds unnecessary character "CQ CQ" → "CQQ CQ"
Transposition: User swaps adjacent characters "PARIS" → "PARIIS"

📝 Sentence Analytics

Track sentence performance across languages with detailed context analysis

🔤 Character Tracking

Individual character errors with sentence position and context analysis

🌍 Multilingual Support

Comprehensive tracking across English, Spanish, French, Italian, Danish, Czech

🎮 Training Modes

Separate analytics for Type mode and Listen mode training

🌍 Multilingual Training Tracking

The system tracks performance across six distinct languages, each optimized for specific linguistic characteristics and training objectives:

🇺🇸 English

Standard English sentences with common amateur radio phrases and general communication

🇪🇸 Spanish

Spanish language sentences with unique character patterns and linguistic structures

🇫🇷 French

French sentences with accented characters and unique phonetic patterns

🇮🇹 Italian

Italian language training with melodic flow and character combinations

🇩🇰 Danish

Danish sentences with unique Nordic character patterns and structures

🇨🇿 Czech

Czech language with complex character combinations and diacritical marks

📈 Cross-Language Analytics

Each language maintains separate analytics allowing users to track improvement in specific linguistic areas. The system identifies which characters cause the most errors in each language context, enabling targeted practice recommendations and revealing language-specific challenges.

🎮 Training Mode Analysis

The system provides separate analytics for two distinct training modes, each designed for different skill development objectives:

⌨️ Type Mode Analytics

  • Active Input: User types what they hear in Morse code
  • Character Matching: Exact character-by-character comparison analysis
  • Error Detection: Precise identification of mistakes with context
  • Learning Focus: Character recognition and typing accuracy
Example Error Analysis:
Expected: "THE QUICK BROWN FOX"
Received: "THA QWICK BROWN FOX"
Errors: E→A (pos 3), UI→WI (substitution pattern)

👂 Listen Mode Analytics

  • Passive Recognition: User listens and mentally processes without typing
  • Comprehension Focus: Understanding complete sentences and context
  • Speed Development: Building fluency at higher speeds
  • Sentence Tracking: Records which sentences were challenging
Listen Mode Tracking:
Session: 20 sentences presented
Marked Difficult: 3 sentences
Focus Areas: Long sentences, numbers, punctuation

📊 Four Levels of Analytics

1. Character-Level Error Analytics

Detailed character-by-character error analysis within sentence context with error type classification and position tracking.

🔴 Substitution Errors

User types wrong character

Expected: QUICK
Received: QUECK
Error: I → E (Position 3)

🟡 Omission Errors

User omits a character

Expected: HELLO
Received: HEL_O
Missing: L (Position 4)

🔵 Insertion Errors

User adds unnecessary character

Expected: WORLD
Received: WORRLD
Extra: R (Position 4)

🟣 Transposition Errors

User swaps adjacent characters

Expected: PARIS
Received: PARSI
Swapped: IS → SI

2. Language Performance Analysis

Comprehensive performance tracking across all six supported languages with comparative analytics.

📈 Performance Metrics

  • • Character Error Count per Language
  • • Language-Specific Accuracy Rates
  • • Average Session Duration
  • • Training Days per Language

🔤 Character Analysis

  • • Most Problematic Characters per Language
  • • Language-Specific Error Patterns
  • • Character Position Error Analysis
  • • Common Character Substitutions

📻 Speed Settings

  • • Average Exact Speed (WPM)
  • • Average Effective Speed (WPM)
  • • Speed Progression per Language
  • • Language Difficulty Analysis

3. Training Mode Comparison

Separate analytics for Type mode and Listen mode with comparative performance analysis.

⌨️ Type Mode Analytics

  • • Detailed character error analysis
  • • Sentence-level accuracy tracking
  • • Position-specific error patterns
  • • Speed vs accuracy correlation
  • • Error type distribution analysis

👂 Listen Mode Analytics

  • • Sentence comprehension tracking
  • • Difficult sentence identification
  • • Session duration and endurance
  • • Language exposure metrics
  • • Progressive difficulty analysis

4. Dashboard Analytics & Insights

Comprehensive visualization and analysis tools for performance tracking and improvement recommendations.

📈 Performance Visualizations

  • • Overall statistics with language breakdown
  • • Character error heat maps by language
  • • Training mode comparison charts
  • • Progress trends over time
  • • Error type distribution analysis

🎯 Personalized Recommendations

  • • Most problematic characters per language
  • • Suggested practice focus areas
  • • Language progression recommendations
  • • Training mode optimization advice
  • • Speed adjustment suggestions

🗄️ Database Schema

cw_sentences_character_errors Table

CREATE TABLE cw_sentences_character_errors (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(255) NOT NULL,
    language VARCHAR(50) NOT NULL,              -- 'english', 'spanish', 'french', 'italian', 'danish', 'czech'
    training_mode VARCHAR(20) NOT NULL DEFAULT 'type',  -- 'type', 'listen'
    expected_char CHAR(1) NOT NULL,
    received_char CHAR(1) NOT NULL,
    error_type VARCHAR(20) NOT NULL,            -- 'substitution', 'omission', 'insertion', 'transposition'
    sentence_context TEXT DEFAULT NULL,         -- Full sentence context
    position_in_sentence INT DEFAULT NULL,      -- Character position within sentence
    sentence_length INT DEFAULT NULL,           -- Total sentence length
    session_accuracy DECIMAL(5,2) DEFAULT NULL, -- Overall session accuracy percentage
    session_total_sentences INT DEFAULT NULL,   -- Total sentences in session
    session_correct_sentences INT DEFAULT NULL, -- Correctly answered sentences
    session_duration INT DEFAULT NULL,          -- Session duration in seconds
    exact_speed INT DEFAULT NULL,               -- Exact speed in WPM
    effective_speed INT DEFAULT NULL,           -- Effective speed in WPM
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,

    INDEX idx_username (username),
    INDEX idx_language (language),
    INDEX idx_training_mode (training_mode),
    INDEX idx_expected_char (expected_char),
    INDEX idx_error_type (error_type),
    INDEX idx_created_at (created_at)
);

🔧 Key Features

  • • Multi-language support (6 languages)
  • • Dual training mode tracking
  • • Character position context
  • • Complete sentence context preservation
  • • Session performance correlation

📊 Analytics Capabilities

  • • Error type classification and trends
  • • Language-specific performance analysis
  • • Character difficulty heat mapping
  • • Training mode effectiveness comparison
  • • Speed progression tracking

🔌 API Endpoints

Character Error Analytics API

POST/GET/DELETE /api/cw-sentences-character-analytics.php

POST - Save Character Errors

{
    "language": "english",
    "training_mode": "type",
    "character_errors": [
        {
            "expected": "I",
            "received": "E",
            "type": "substitution",
            "sentence": "QUICK BROWN FOX",
            "position": 3
        }
    ],
    "total_sentences": 10,
    "correct_sentences": 8,
    "session_duration": 300,
    "accuracy_percentage": 85.5,
    "exact_speed": 20,
    "effective_speed": 18
}

GET - Retrieve Analytics

Parameters:
?language=english
&training_mode=type  
&timeframe=30d

Response:
{
    "success": true,
    "data": {
        "error_types": [...],
        "problematic_characters": [...],
        "language_performance": [...],
        "training_mode_performance": [...],
        "recent_trends": [...]
    }
}

DELETE - Clear Analytics

DELETE Request
No body required

Response:
{
    "success": true,
    "message": "Successfully cleared character analytics",
    "data": {
        "deleted_records": 42
    }
}

⚙️ Implementation Details

🔍 Character Error Detection Algorithm

Multi-Language Character Comparison:

  • Levenshtein distance calculation for error classification
  • Position-aware error detection with sentence context
  • Unicode-aware comparison for international characters
  • Contextual analysis for better error categorization
function analyzeCharacterErrors(expected, received, sentenceContext) {
    const errors = [];
    const expectedArray = expected.split('');
    const receivedArray = received.split('');
    
    // Detailed character-by-character analysis with position tracking
    // Supports all error types: substitution, omission, insertion, transposition
    // Preserves sentence context for better analytics
    
    return errors; // Array of detailed error objects
}

📊 Analytics Processing Pipeline

Data Collection

  • • Real-time character error capture
  • • Session performance correlation
  • • Language-specific data segregation
  • • Training mode differentiation
  • • Speed setting preservation

Analysis Generation

  • • Dynamic query optimization
  • • Multi-dimensional aggregation
  • • Trend calculation algorithms
  • • Performance comparison metrics
  • • Recommendation engine logic

📈 Dashboard Features

Visualization Components

  • • Character error heat maps
  • • Language performance charts
  • • Training mode comparison graphs
  • • Progress trend visualizations
  • • Interactive filtering controls

Filter Capabilities

  • • Language-specific filtering
  • • Training mode isolation
  • • Time period selection
  • • Error type focusing
  • • Performance threshold filtering

Export & Management

  • • Complete analytics clearing
  • • Success notifications
  • • Error handling and recovery
  • • Performance optimization
  • • Responsive design adaptation

📊 Analytics Dashboard Features

The CW Sentences Analytics Dashboard provides comprehensive visualization and analysis tools designed for multilingual Morse code sentence training optimization.

📈 Core Analytics Views

  • Overview Statistics: Total errors, languages practiced, training days, average accuracy
  • Error Type Breakdown: Visual analysis of substitution, omission, insertion, transposition errors
  • Problematic Characters: Character cards showing most error-prone characters with context
  • Language Performance: Comparative analysis across all six supported languages

🎯 Advanced Features

  • Training Mode Comparison: Type vs Listen mode performance analysis
  • Trend Visualization: Chart.js powered progress tracking over time
  • Interactive Filtering: Language, training mode, and time period controls
  • Data Management: Complete analytics clearing with confirmation

🚀 Real-Time Integration

The dashboard seamlessly integrates with the CW Sentences training application, automatically capturing character errors during both Type and Listen mode sessions. All analytics update in real-time as users complete training sessions, providing immediate insights into learning progress and areas for improvement.

This documentation covers the complete CW Sentences Analytics system implementation in Morse Trainer Pro.
For technical support or feature requests, please contact the development team.