# alexengelhardt/startup-name-generator architecture

> Architecture diagram of the GitHub repository alexengelhardt/startup-name-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alexengelhardt/startup-name-generator
- Repository: https://github.com/alexengelhardt/startup-name-generator

## Overview

SNG is a Python library for learning character patterns from a word corpus and generating name suggestions. The principal workflow is to configure a Generator, supply words or load a bundled wordlist, train its recurrent model, and simulate names. The Generator also saves and reloads trained state. The graph separates corpus loading, model work, and configuration, but the sampled implementation places training, generation, and persistence in one class; unsampled details are not expanded.

Main entry points: [`sng/Generator.py`](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/Generator.py) (Generator), [`sng/__init__.py`](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/__init__.py) (Package API), [`sng/builtin_wordlists.py`](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/builtin_wordlists.py) (Wordlist Loader), [`sng/Config.py`](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/Config.py) (Generator Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_api["Package API<br/>[__init__.py]"]
  node_config["Generator Config<br/>[Config.py]"]
end

subgraph group_corpus["Corpus Inputs"]
  node_builtin["Wordlist Loader"]
  node_wordlists["Bundled Wordlists"]
end

subgraph group_engine["Generation Engine"]
  node_generator["Generator<br/>[Generator.py]"]
  node_sampler["Temperature Scaling<br/>[helpers.py]"]
end

node_user(("Library User"))
node_keras["Keras Runtime"]

node_user -->|"uses"| node_api
node_api -->|"exports"| node_generator
node_api -->|"exports"| node_config
node_api -->|"exports"| node_builtin
node_user -->|"chooses corpus"| node_builtin
node_builtin -->|"reads"| node_wordlists
node_user -->|"supplies words"| node_generator
node_generator -->|"uses settings"| node_config
node_generator -->|"scales probabilities"| node_sampler
node_generator -->|"trains and predicts"| node_keras

click node_api "https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/__init__.py"
click node_config "https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/Config.py"
click node_builtin "https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/builtin_wordlists.py"
click node_wordlists "https://github.com/alexengelhardt/startup-name-generator/tree/master/sng/wordlists"
click node_generator "https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/Generator.py"
click node_sampler "https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/helpers.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_config,node_user toneBlue
class node_builtin,node_wordlists toneAmber
class node_generator,node_sampler toneMint
class node_keras toneIndigo
```

## Components

### Public API

- [Package API](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/__init__.py): `sng/__init__.py`
- [Generator Config](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/Config.py): `sng/Config.py`

### Corpus Inputs

- [Wordlist Loader](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/builtin_wordlists.py): `sng/builtin_wordlists.py`
- [Bundled Wordlists](https://github.com/alexengelhardt/startup-name-generator/tree/master/sng/wordlists): `sng/wordlists`

### Generation Engine

- [Generator](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/Generator.py): `sng/Generator.py`
- [Temperature Scaling](https://github.com/alexengelhardt/startup-name-generator/blob/master/sng/helpers.py): `sng/helpers.py`

### Other components

- **Library User**
- **Keras Runtime**

## Connections

- Library User → Package API: uses (evidence: `README.rst`)
- Package API → Generator: exports (evidence: `sng/__init__.py`)
- Package API → Generator Config: exports (evidence: `sng/__init__.py`)
- Package API → Wordlist Loader: exports (evidence: `sng/__init__.py`)
- Library User → Wordlist Loader: chooses corpus (evidence: `sng/builtin_wordlists.py`)
- Wordlist Loader → Bundled Wordlists: reads (evidence: `sng/builtin_wordlists.py`)
- Library User → Generator: supplies words (evidence: `sng/Generator.py`)
- Generator → Generator Config: uses settings (evidence: `sng/Generator.py`)
- Generator → Temperature Scaling: scales probabilities (evidence: `sng/Generator.py`)
- Generator → Keras Runtime: trains and predicts (evidence: `sng/Generator.py`)
