# emerssn/qpp-benchmark architecture

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

- Interactive diagram: https://gitdiagram.com/emerssn/qpp-benchmark
- Repository: https://github.com/emerssn/qpp-benchmark

## Overview

##### Main Components

a. Core System Components:
- Data Processing Layer
- QPP Methods Layer
- Evaluation Layer
- Retrieval System
- Index Management
- Results Analysis

b. Key Interactions:
- Data flow between components
- Evaluation pipeline
- Method execution flow

##### Implementation Details to Highlight

- Factory pattern implementation (qpp_factory.py)
- Separation between pre and post-retrieval methods
- Demonstrate the evaluation pipeline flow
- Test framework integration

##### Specific Recommendations

a. Create a hierarchical layout with:
- Top level: Input/Output interfaces
- Middle level: Core processing components
- Bottom level: Evaluation and analysis

b. Specific callouts for:
- Correlation analysis workflows
- Dataset processing pipelines
- Method evaluation paths

##### Technical Details

- Integration with external libraries
- Test coverage paths
- Evaluation metric calculation points
- Data transformation steps

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Style Definitions
    classDef processing fill:#ADD8E6,stroke:#333
    classDef qpp fill:#90EE90,stroke:#333
    classDef eval fill:#FFA500,stroke:#333
    classDef utils fill:#D3D3D3,stroke:#333
    classDef storage fill:#FFE4B5,stroke:#333

    %% Legend
    subgraph Legend
        L1[Processing Components]:::processing
        L2[QPP Methods]:::qpp
        L3[Evaluation Components]:::eval
        L4[Utility Components]:::utils
        L5[(Storage Components)]:::storage
    end

    %% Input Layer
    subgraph Input
        DP["Dataset Processors"]:::processing
        CM["Configuration Management"]:::utils
        TPU["Text Processing Utils"]:::utils
    end
    click DP "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/data/dataset_processor.py"
    click TPU "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/utils/text_processing.py"

    %% Core Processing Layer
    subgraph Core
        IB["Index Builder"]:::processing
        RS["Retrieval System"]:::processing
        QF["QPP Factory"]:::processing
    end
    click IB "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/indexing/index_builder.py"
    click RS "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/retrieval/retrieval.py"
    click QF "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/metodos/qpp_factory.py"

    %% QPP Methods Layer
    subgraph "Pre-retrieval Methods"
        IDF["IDF"]:::qpp
        SCQ["SCQ"]:::qpp
    end
    click IDF "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/metodos/pre_retrieval/idf.py"
    click SCQ "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/metodos/pre_retrieval/scq.py"

    subgraph "Post-retrieval Methods"
        CLARITY["Clarity"]:::qpp
        NQC["NQC"]:::qpp
        WIG["WIG"]:::qpp
        UEF["UEF"]:::qpp
    end
    click CLARITY "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/metodos/post_retrieval/clarity.py"
    click NQC "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/metodos/post_retrieval/nqc.py"
    click WIG "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/metodos/post_retrieval/wig.py"
    click UEF "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/metodos/post_retrieval/uef.py"

    %% Evaluation Layer
    subgraph Evaluation
        CA["Correlation Analyzer"]:::eval
        PE["Performance Evaluator"]:::eval
        RC[(Results Collection)]:::storage
    end
    click CA "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/evaluation/correlation_analyzer.py"
    click PE "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/evaluation/evaluator.py"
    click RC "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/evaluation_results/evaluation_results.txt"

    %% Output Layer
    subgraph Output
        CAR[(Correlation Analysis Reports)]:::storage
        TR[(Test Results)]:::storage
        SC["Statistics Collection"]:::utils
    end
    click CAR "https://github.com/emerssn/QPP-Benchmark/tree/main/EvaluacionQPP/correlation_analysis"
    click TR "https://github.com/emerssn/QPP-Benchmark/tree/main/test_results"
    click SC "https://github.com/emerssn/QPP-Benchmark/blob/main/EvaluacionQPP/utils/test_stats_collector.py"

    %% Connections
    DP --> IB
    TPU --> DP
    CM --> QF
    IB --> RS
    RS --> QF
    QF --> IDF & SCQ
    QF --> CLARITY & NQC & WIG & UEF
    IDF & SCQ --> PE
    CLARITY & NQC & WIG & UEF --> PE
    PE --> CA
    CA --> RC
    RC --> CAR
    PE --> TR
    TR --> SC
```
