# rswilkens/bicourage architecture

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

- Interactive diagram: https://gitdiagram.com/rswilkens/bicourage
- Repository: https://github.com/rswilkens/bicourage

## Overview

biCourage is a graph-neural-network system for classifying annotated text, with hate/offensive-language data suggested by the preprocessing code; the README itself gives no product description. The apparent workflow spans text annotation, BERT embeddings, graph construction, graph loading, and model training/evaluation. The sampled entry point directly selects a model and invokes training; the source index also links it to the data loader. Preprocessing scripts appear to generate artifacts consumed by later stages, but no sampled caller or README documents those links, so they are not asserted here.

Main entry points: [`main.py`](https://github.com/rswilkens/bicourage/blob/master/main.py) (Experiment Runner), [`dataloader.py`](https://github.com/rswilkens/bicourage/blob/master/dataloader.py) (Graph Loading), [`models.py`](https://github.com/rswilkens/bicourage/blob/master/models.py) (GNN Models), [`learner.py`](https://github.com/rswilkens/bicourage/blob/master/learner.py) (Training and Evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Text Preparation"]
  node_clean["Text Parser<br/>[clean_parser.py]"]
  node_bert["BERT Embeddings<br/>[bert_annotation.py]"]
end

subgraph group_graphs["Graph Data"]
  node_ngraph["N-gram Graphs"]
  node_sgraph["Syntactic Graphs"]
  node_cv["Fold Generation<br/>[createCV.py]"]
  node_loader["Graph Loading<br/>[dataloader.py]"]
end

subgraph group_training["Model Training"]
  node_entry["Experiment Runner<br/>[main.py]"]
  node_models["GNN Models<br/>[models.py]"]
  node_learner["Training and Evaluation<br/>[learner.py]"]
end

node_user(("Experiment Runner"))

node_user -->|"configures"| node_entry
node_entry -->|"loads graphs"| node_loader
node_entry -->|"selects model"| node_models
node_entry -->|"starts training"| node_learner

click node_clean "https://github.com/rswilkens/bicourage/blob/master/clean_parser.py"
click node_bert "https://github.com/rswilkens/bicourage/blob/master/bert_annotation.py"
click node_ngraph "https://github.com/rswilkens/bicourage/blob/master/annotated_daset2graph.py"
click node_sgraph "https://github.com/rswilkens/bicourage/blob/master/annotated_daset2graph_syn.py"
click node_cv "https://github.com/rswilkens/bicourage/blob/master/createCV.py"
click node_loader "https://github.com/rswilkens/bicourage/blob/master/dataloader.py"
click node_entry "https://github.com/rswilkens/bicourage/blob/master/main.py"
click node_models "https://github.com/rswilkens/bicourage/blob/master/models.py"
click node_learner "https://github.com/rswilkens/bicourage/blob/master/learner.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_clean,node_bert toneBlue
class node_ngraph,node_sgraph,node_cv,node_loader toneAmber
class node_entry,node_models,node_learner toneMint
class node_user toneIndigo
```

## Components

### Text Preparation

- [Text Parser](https://github.com/rswilkens/bicourage/blob/master/clean_parser.py): `clean_parser.py`
- [BERT Embeddings](https://github.com/rswilkens/bicourage/blob/master/bert_annotation.py): `bert_annotation.py`

### Graph Data

- [N-gram Graphs](https://github.com/rswilkens/bicourage/blob/master/annotated_daset2graph.py): `annotated_daset2graph.py`
- [Syntactic Graphs](https://github.com/rswilkens/bicourage/blob/master/annotated_daset2graph_syn.py): `annotated_daset2graph_syn.py`
- [Fold Generation](https://github.com/rswilkens/bicourage/blob/master/createCV.py): `createCV.py`
- [Graph Loading](https://github.com/rswilkens/bicourage/blob/master/dataloader.py): `dataloader.py`

### Model Training

- [Experiment Runner](https://github.com/rswilkens/bicourage/blob/master/main.py): `main.py`
- [GNN Models](https://github.com/rswilkens/bicourage/blob/master/models.py): `models.py`
- [Training and Evaluation](https://github.com/rswilkens/bicourage/blob/master/learner.py): `learner.py`

### Other components

- **Experiment Runner**

## Connections

- Experiment Runner → Experiment Runner: configures (evidence: `main.py`)
- Experiment Runner → Graph Loading: loads graphs (evidence: `main.py`)
- Experiment Runner → GNN Models: selects model (evidence: `main.py`)
- Experiment Runner → Training and Evaluation: starts training (evidence: `main.py`)
