# jbaber/major_system architecture

> Architecture diagram of the GitHub repository jbaber/major_system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jbaber/major_system
- Repository: https://github.com/jbaber/major_system

## Overview

##### Project Type Analysis
This is a specialized Python library tool that focuses on text processing and conversion, specifically dealing with phonetic transformations. The project appears to use the CMU Phonetic Dictionary as a core resource.

##### Main Components

a. Core Components:
- Input Processing Module
- CMU Dictionary Interface
- Major System Converter
- CLI Interface

b. Data Flow Components:
- CMU Phonetic Dictionary Data Store
- Number-to-Phoneme Mapper
- Word Generator/Matcher

**Top Level (User Interface):**
- CLI Interface (major_words command)

**Middle Level (Processing):**
- Major System Converter (major_system.py)
- Number Processing Logic
- Phonetic Matching Engine

**Bottom Level (Data):**
- CMU Dictionary Data Store (cmudict-0.7b)
- Phonetic Symbols (cmudict.0.7a.symbols)

##### Key Relationships to Highlight

- How the CLI interface interacts with the major system converter
- Relationship between the converter and the CMU dictionary
- Demonstrate the phonetic matching process flow
- Number-to-phoneme mapping logic

##### Technical Details
- Python version compatibility
- CMU Dictionary version and format
- Input/Output formats
- Key dependencies

Remember to include the CI/CD aspect in a small section, showing how the GitLab CI pipeline connects to the PyPI release process, as mentioned in the README.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Interface
        CLI[CLI Interface]:::ui
    end

    subgraph Processing
        MSC[Major System Converter]:::core
        NPL[Number Processing Logic]:::core
        PME[Phonetic Matching Engine]:::core
    end

    subgraph Data
        CMU[(CMU Dictionary)]:::data
        PS[(Phonetic Symbols)]:::data
        NP[Number-Phoneme Mapper]:::data
    end

    subgraph CI/CD
        CICD[GitLab CI Pipeline]:::cicd
        PYPI[PyPI Release]:::cicd
    end

    %% Relationships
    CLI --> MSC
    MSC --> NPL
    NPL --> PME
    PME --> CMU
    PME --> PS
    NPL --> NP
    CICD --> PYPI

    %% Click Events
    click MSC "https://github.com/jbaber/major_system/blob/master/major_system/major_system.py"
    click CMU "https://github.com/jbaber/major_system/blob/master/major_system/cmu_phonetic_dictionary/cmudict-0.7b"
    click PS "https://github.com/jbaber/major_system/blob/master/major_system/cmu_phonetic_dictionary/cmudict.0.7a.symbols"
    click CICD "https://github.com/jbaber/major_system/blob/master/.gitlab-ci.yml"

    %% Process Flow
    CLI -.-> |1. Number Input| MSC
    MSC -.-> |2. Conversion| NPL
    NPL -.-> |3. Matching| PME
    PME -.-> |4. Results| CLI

    %% Styling
    classDef ui fill:#6495ED,stroke:#333,stroke-width:2px
    classDef core fill:#98FB98,stroke:#333,stroke-width:2px
    classDef data fill:#FFD700,stroke:#333,stroke-width:2px
    classDef cicd fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[User Interface]:::ui
        L2[Core Processing]:::core
        L3[(Data Store)]:::data
        L4[CI/CD Pipeline]:::cicd
    end
```
